Re: [systemd-devel] [PATCH] Remove accelerometer helper
Hi On Fri, Jul 3, 2015 at 1:25 PM, Lennart Poettering lenn...@poettering.net wrote: On Mon, 29.06.15 16:03, Tom Gundersen (t...@jklm.no) wrote: On Sat, Jun 27, 2015 at 10:02 PM, Kay Sievers k...@vrfy.org wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 https://github.com/systemd/systemd/pull/387 This was now merged, so distros should be aware that they need to pick up iio-sensor-proxy with the next systemd release. Could you please add a note with the details regarding this to NEWS for v222 already, so that we don't forget this? Done. Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Mon, 29.06.15 16:03, Tom Gundersen (t...@jklm.no) wrote: On Sat, Jun 27, 2015 at 10:02 PM, Kay Sievers k...@vrfy.org wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 https://github.com/systemd/systemd/pull/387 This was now merged, so distros should be aware that they need to pick up iio-sensor-proxy with the next systemd release. Could you please add a note with the details regarding this to NEWS for v222 already, so that we don't forget this? Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Sat, Jun 27, 2015 at 10:02 PM, Kay Sievers k...@vrfy.org wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 https://github.com/systemd/systemd/pull/387 This was now merged, so distros should be aware that they need to pick up iio-sensor-proxy with the next systemd release. Cheers, Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 https://github.com/systemd/systemd/pull/387 Thanks, Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] Remove accelerometer helper
It's moved to the iio-sensor-proxy D-Bus service. --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 - 5 files changed, 323 deletions(-) delete mode 100644 rules/61-accelerometer.rules delete mode 12 src/udev/accelerometer/Makefile delete mode 100644 src/udev/accelerometer/accelerometer.c diff --git a/.gitignore b/.gitignore index d2f1a1f..0eaa65f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ /GRTAGS /GSYMS /GTAGS -/accelerometer /ata_id /bootctl /build-aux diff --git a/Makefile.am b/Makefile.am index f84a28d..90a78a9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4087,21 +4087,6 @@ dist_udevrules_DATA += \ rules/60-persistent-v4l.rules # --- --- -accelerometer_SOURCES = \ - src/udev/accelerometer/accelerometer.c - -accelerometer_LDADD = \ - libudev-internal.la \ - libsystemd-internal.la \ - libsystemd-shared.la - -udevlibexec_PROGRAMS += \ - accelerometer - -dist_udevrules_DATA += \ - rules/61-accelerometer.rules - -# --- --- if ENABLE_GUDEV if ENABLE_GTK_DOC SUBDIRS += \ diff --git a/rules/61-accelerometer.rules b/rules/61 -accelerometer.rules deleted file mode 100644 index a6a2bfd..000 --- a/rules/61-accelerometer.rules +++ /dev/null @@ -1,3 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM==input, ACTION!=remove, ENV{ID_INPUT_ACCELEROMETER}==1, IMPORT{program}=accelerometer %p diff --git a/src/udev/accelerometer/Makefile b/src/udev/accelerometer/Makefile deleted file mode 12 index d0b0e8e..000 --- a/src/udev/accelerometer/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile \ No newline at end of file diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c deleted file mode 100644 index 9e2c590..000 --- a/src/udev/accelerometer/accelerometer.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * accelerometer - exports device orientation through property - * - * When an change event is received on an accelerometer, - * open its device node, and from the value, as well as the previous - * value of the property, calculate the device's new orientation, - * and export it as ID_INPUT_ACCELEROMETER_ORIENTATION. - * - * Possible values are: - * undefined - * * normal - * * bottom-up - * * left-up - * * right-up - * - * The property will be persistent across sessions, and the new - * orientations can be deducted from the previous one (it allows - * for a threshold for switching between opposite ends of the - * orientation). - * - * Copyright (C) 2011 Red Hat, Inc. - * Author: - * Bastien Nocera had...@hadess.net - * - * orientation_calc() from the sensorfw package - * Copyright (C) 2009-2010 Nokia Corporation - * Authors: - * Üstün Ergenoglu ext-ustun.ergeno...@nokia.com - * Timo Rongas ext-timo.2.ron...@nokia.com - * Lihan Guo lihan@digia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include stdio.h -#include string.h -#include math.h -#include stdlib.h -#include getopt.h -#include limits.h -#include linux/input.h - -#include libudev.h -#include libudev-private.h - -/* we must use this kernel-compatible implementation */ -#define BITS_PER_LONG (sizeof(unsigned long) * 8) -#define NBITS(x) x)-1)/BITS_PER_LONG)+1) -#define OFF(x) ((x)%BITS_PER_LONG) -#define BIT(x) (1ULOFF(x)) -#define LONG(x) ((x)/BITS_PER_LONG) -#define test_bit(bit, array)((array[LONG(bit)] OFF(bit)) 1) - -typedef enum { -ORIENTATION_UNDEFINED, -ORIENTATION_NORMAL, -ORIENTATION_BOTTOM_UP, -ORIENTATION_LEFT_UP, -ORIENTATION_RIGHT_UP -} OrientationUp; - -static const char *orientations[] = { -undefined, -normal, -bottom-up, -left-up, -right-up, -NULL -}; - -#define ORIENTATION_UP_UP ORIENTATION_NORMAL - -#define DEFAULT_THRESHOLD 250 -#define RADIANS_TO_DEGREES 180.0/M_PI -#define SAME_AXIS_LIMIT 5 - -#define THRESHOLD_LANDSCAPE 25 -#define
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. Nice! When was this released? Should we expect all distros to have picked up this yet? --- .gitignore | 1 - Makefile.am| 15 -- rules/61-accelerometer.rules | 3 - src/udev/accelerometer/Makefile| 1 - src/udev/accelerometer/accelerometer.c | 303 - 5 files changed, 323 deletions(-) delete mode 100644 rules/61-accelerometer.rules delete mode 12 src/udev/accelerometer/Makefile delete mode 100644 src/udev/accelerometer/accelerometer.c diff --git a/.gitignore b/.gitignore index d2f1a1f..0eaa65f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ /GRTAGS /GSYMS /GTAGS -/accelerometer /ata_id /bootctl /build-aux diff --git a/Makefile.am b/Makefile.am index f84a28d..90a78a9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4087,21 +4087,6 @@ dist_udevrules_DATA += \ rules/60-persistent-v4l.rules # --- --- -accelerometer_SOURCES = \ - src/udev/accelerometer/accelerometer.c - -accelerometer_LDADD = \ - libudev-internal.la \ - libsystemd-internal.la \ - libsystemd-shared.la - -udevlibexec_PROGRAMS += \ - accelerometer - -dist_udevrules_DATA += \ - rules/61-accelerometer.rules - -# --- --- if ENABLE_GUDEV if ENABLE_GTK_DOC SUBDIRS += \ diff --git a/rules/61-accelerometer.rules b/rules/61 -accelerometer.rules deleted file mode 100644 index a6a2bfd..000 --- a/rules/61-accelerometer.rules +++ /dev/null @@ -1,3 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM==input, ACTION!=remove, ENV{ID_INPUT_ACCELEROMETER}==1, IMPORT{program}=accelerometer %p diff --git a/src/udev/accelerometer/Makefile b/src/udev/accelerometer/Makefile deleted file mode 12 index d0b0e8e..000 --- a/src/udev/accelerometer/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile \ No newline at end of file diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c deleted file mode 100644 index 9e2c590..000 --- a/src/udev/accelerometer/accelerometer.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * accelerometer - exports device orientation through property - * - * When an change event is received on an accelerometer, - * open its device node, and from the value, as well as the previous - * value of the property, calculate the device's new orientation, - * and export it as ID_INPUT_ACCELEROMETER_ORIENTATION. - * - * Possible values are: - * undefined - * * normal - * * bottom-up - * * left-up - * * right-up - * - * The property will be persistent across sessions, and the new - * orientations can be deducted from the previous one (it allows - * for a threshold for switching between opposite ends of the - * orientation). - * - * Copyright (C) 2011 Red Hat, Inc. - * Author: - * Bastien Nocera had...@hadess.net - * - * orientation_calc() from the sensorfw package - * Copyright (C) 2009-2010 Nokia Corporation - * Authors: - * Üstün Ergenoglu ext-ustun.ergeno...@nokia.com - * Timo Rongas ext-timo.2.ron...@nokia.com - * Lihan Guo lihan@digia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include stdio.h -#include string.h -#include math.h -#include stdlib.h -#include getopt.h -#include limits.h -#include linux/input.h - -#include libudev.h -#include libudev-private.h - -/* we must use this kernel-compatible implementation */ -#define BITS_PER_LONG (sizeof(unsigned long) * 8) -#define NBITS(x) x)-1)/BITS_PER_LONG)+1) -#define OFF(x) ((x)%BITS_PER_LONG) -#define BIT(x) (1ULOFF(x)) -#define LONG(x) ((x)/BITS_PER_LONG) -#define test_bit(bit, array)((array[LONG(bit)] OFF(bit)) 1) - -typedef enum { -ORIENTATION_UNDEFINED, -ORIENTATION_NORMAL, -ORIENTATION_BOTTOM_UP, -ORIENTATION_LEFT_UP, -ORIENTATION_RIGHT_UP -} OrientationUp; - -static const char
Re: [systemd-devel] [PATCH] Remove accelerometer helper
On Fri, 2015-05-22 at 17:00 +0200, Tom Gundersen wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. Nice! When was this released? Should we expect all distros to have picked up this yet? It was released as 1.0 today, so, no, I don't expect all distros to have it, in fact, I don't expect any to have it ;) It probably doesn't hurt leaving it in systemd for now, but I wanted to be sure to post the patch as early as possible. Cheers ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Remove accelerometer helper
Hi On Fri, May 22, 2015 at 5:10 PM, Bastien Nocera had...@hadess.net wrote: On Fri, 2015-05-22 at 17:00 +0200, Tom Gundersen wrote: On Fri, May 22, 2015 at 3:42 PM, Bastien Nocera had...@hadess.net wrote: It's moved to the iio-sensor-proxy D-Bus service. Nice! When was this released? Should we expect all distros to have picked up this yet? It was released as 1.0 today, so, no, I don't expect all distros to have it, in fact, I don't expect any to have it ;) Awesome! Much appreciated! I think we wanna do another systemd release soon (with the sd-bus/event exports), we can apply this patch afterwards then (with the gudev removal, too). Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel