From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Date: Tue, 7 Oct 2014 09:00:48 +0100 Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> Sender: linux-parisc-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="windows-1252" To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, Linus Walleij On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. >=20 > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctr= l.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned lo= ng unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > =20 > - if (sysctrl_dev =3D=3D NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-parisc"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Date: Tue, 7 Oct 2014 09:00:48 +0100 Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> Sender: linux-parisc-owner@vger.kernel.org To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.orgLinus Walleij List-Id: linux-acpi@vger.kernel.org On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. >=20 > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctr= l.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned lo= ng unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > =20 > - if (sysctrl_dev =3D=3D NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-parisc"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Date: Tue, 07 Oct 2014 08:00:48 +0000 Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Message-Id: <20141007080048.GB25331@lee--X1> List-Id: References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.orgLinusWalleij On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. >=20 > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned long u= nused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > =20 > - if (sysctrl_dev =3D NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 07 Oct 2014 10:01:04 +0200 (CEST) Received: from mail-ig0-f179.google.com ([209.85.213.179]:36035 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27010665AbaJGIBDSu0Lp (ORCPT ); Tue, 7 Oct 2014 10:01:03 +0200 Received: by mail-ig0-f179.google.com with SMTP id h18so4267101igc.0 for ; Tue, 07 Oct 2014 01:00:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=fbO0x+dbtEI+osNOFoN6mlB2Ti38IfEik6IoHTaZtD4=; b=aBGi9U9rjvcBqxMvtcZVdsDDXCAG2OFUrHUud+z2kjU2p3gY27nt3GmTRl+/X94pwU oIOZ5DS83sGajM7jb9z55Ahh8dln8PIM5SK+Nu4vtkjQ2JLwXX48Qnbu6FOxhe6SlZzG ICc0apL0/JPT39aDi6Ahg5xqS8WfoKl/AATqVeqzo1ZRDE6F6iFjIsh8bjxEBJxNeGyH s8oelKxRnt3YGrjR/Rg273VV+iyGP5mIszUWPcKgS6o8wSYlX2yShuIn00oVqDqSagi/ CicqXyI7dZxhnY0A2rzR3ZvuNiPFQkkpT2hrTmhpuJgCWBCZtFa7w3FY2eIRSZEXMz85 DkiQ== X-Gm-Message-State: ALoCoQlePIQ8nMSu2HVbSlLfL1JoYFyxyRZHzLuiDK7k6BwZHhEpmcZoGsuIgkYGgITV8K0rD1BD X-Received: by 10.42.61.137 with SMTP id u9mr2520721ich.54.1412668857025; Tue, 07 Oct 2014 01:00:57 -0700 (PDT) Received: from lee--X1 (host109-148-233-9.range109-148.btcentralplus.com. [109.148.233.9]) by mx.google.com with ESMTPSA id j2sm11554920igm.21.2014.10.07.01.00.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 07 Oct 2014 01:00:56 -0700 (PDT) Date: Tue, 7 Oct 2014 09:00:48 +0100 From: Lee Jones To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, Linus Walleij , Samuel Ortiz Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 43040 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: lee.jones@linaro.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. > > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) > > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned long unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > > - if (sysctrl_dev == NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Date: Tue, 7 Oct 2014 09:00:48 +0100 Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, Linus Walleij Return-path: In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> List-ID: List-Id: linux-parisc.vger.kernel.org On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. >=20 > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctr= l.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned lo= ng unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > =20 > - if (sysctrl_dev =3D=3D NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-parisc"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Date: Tue, 7 Oct 2014 09:00:48 +0100 Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> Sender: linux-parisc-owner@vger.kernel.org List-Archive: List-Post: To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.orgLinusWalleij List-ID: On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. >=20 > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctr= l.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned lo= ng unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > =20 > - if (sysctrl_dev =3D=3D NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-parisc"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 7 Oct 2014 09:00:48 +0100 From: Lee Jones Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: QUOTED-PRINTABLE In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> Sender: devicetree-owner@vger.kernel.org Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, Linus Walleij , Samuel Ortiz List-ID: On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. >=20 > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctr= l.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned lo= ng unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > =20 > - if (sysctrl_dev =3D=3D NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3334E1A05B1 for ; Tue, 7 Oct 2014 19:00:59 +1100 (EST) Received: by mail-ie0-f180.google.com with SMTP id x19so4905551ier.11 for ; Tue, 07 Oct 2014 01:00:57 -0700 (PDT) Date: Tue, 7 Oct 2014 09:00:48 +0100 From: Lee Jones To: Guenter Roeck Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> Cc: linux-m32r-ja@ml.linux-m32r.org, linux-mips@linux-mips.org, linux-efi@vger.kernel.org, linux-ia64@vger.kernel.org, linux-xtensa@linux-xtensa.org, Linus Walleij , devel@driverdev.osuosl.org, linux-s390@vger.kernel.org, lguest@lists.ozlabs.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, linux-acpi@vger.kernel.org, xen-devel@lists.xenproject.org, devicetree@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net, linux-pm@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, linux-m68k@lists.linux-m68k.org, linux-am33-list@redhat.com, linux-tegra@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-metag@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Ortiz , linux-parisc@vger.kernel.org, linux-cris-kernel@axis.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. > > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) > > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned long unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > > - if (sysctrl_dev == NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Tue, 7 Oct 2014 09:00:48 +0100 Subject: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> Message-ID: <20141007080048.GB25331@lee--X1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. > > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) > > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned long unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > > - if (sysctrl_dev == NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368AbaJGIBC (ORCPT ); Tue, 7 Oct 2014 04:01:02 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:42446 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752758AbaJGIA5 (ORCPT ); Tue, 7 Oct 2014 04:00:57 -0400 Date: Tue, 7 Oct 2014 09:00:48 +0100 From: Lee Jones To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, Linus Walleij , Samuel Ortiz Subject: Re: [PATCH 12/44] mfd: ab8500-sysctrl: Register with kernel poweroff handler Message-ID: <20141007080048.GB25331@lee--X1> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-13-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1412659726-29957-13-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 06 Oct 2014, Guenter Roeck wrote: > Register with kernel poweroff handler instead of setting pm_power_off > directly. Register with a low priority value of 64 to reflect that > the original code only sets pm_power_off if it was not already set. > > Cc: Linus Walleij > Cc: Lee Jones > Cc: Samuel Ortiz > Signed-off-by: Guenter Roeck > --- > drivers/mfd/ab8500-sysctrl.c | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) > > diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c > index 8e0dae5..677438f 100644 > --- a/drivers/mfd/ab8500-sysctrl.c > +++ b/drivers/mfd/ab8500-sysctrl.c > @@ -6,6 +6,7 @@ [...] > +static int ab8500_power_off(struct notifier_block *this, unsigned long unused1, > + void *unused2) > { > sigset_t old; > sigset_t all; > @@ -34,11 +36,6 @@ static void ab8500_power_off(void) > struct power_supply *psy; > int ret; > > - if (sysctrl_dev == NULL) { > - pr_err("%s: sysctrl not initialized\n", __func__); > - return; > - } Can you explain the purpose of this change please? > /* > * If we have a charger connected and we're powering off, > * reboot into charge-only mode. > @@ -83,8 +80,15 @@ shutdown: > AB8500_STW4500CTRL1_SWRESET4500N); > (void)sigprocmask(SIG_SETMASK, &old, NULL); > } > + > + return NOTIFY_DONE; > } -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog