lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 6 Dec 2018 01:46:10 +0000
From:   Anson Huang <anson.huang@....com>
To:     Fabio Estevam <festevam@...il.com>
CC:     Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Sascha Hauer <kernel@...gutronix.de>,
        Fabio Estevam <fabio.estevam@....com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH 1/3] ARM: dts: imx6qdl-sabresd: add light sensor support

Hi, Fabio

Best Regards!
Anson Huang

> -----Original Message-----
> From: Fabio Estevam [mailto:festevam@...il.com]
> Sent: 2018年12月5日 20:15
> To: Anson Huang <anson.huang@....com>
> Cc: Shawn Guo <shawnguo@...nel.org>; Sascha Hauer
> <s.hauer@...gutronix.de>; Sascha Hauer <kernel@...gutronix.de>; Fabio
> Estevam <fabio.estevam@....com>; Rob Herring <robh+dt@...nel.org>;
> Mark Rutland <mark.rutland@....com>; moderated list:ARM/FREESCALE IMX
> / MXC ARM ARCHITECTURE <linux-arm-kernel@...ts.infradead.org>; open
> list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@...r.kernel.org>; linux-kernel <linux-kernel@...r.kernel.org>;
> dl-linux-imx <linux-imx@....com>
> Subject: Re: [PATCH 1/3] ARM: dts: imx6qdl-sabresd: add light sensor support
> 
> Hi Anson,
> 
> On Wed, Dec 5, 2018 at 7:20 AM Anson Huang <anson.huang@....com>
> wrote:
> >
> > Add isl29023 light sensor support on i2c3 bus, the light sensor's
> > power is controlled by a fixed regulator, since the isl29023 driver
> > and most of other sensors on same board like mag3110 and mma8451 do
> > NOT support regulator operation currently, they are all controlled by
> > this regulator, so this patch also adds the fixed regulator support
> > and make it always on.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@....com>
> > ---
> >  arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 34
> > ++++++++++++++++++++++++++++++++++
> >  1 file changed, 34 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> > b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> > index d7389b5..f96ae54 100644
> > --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> > +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> > @@ -62,6 +62,19 @@
> >                         gpio = <&gpio3 19 0>;
> >                         enable-active-high;
> >                 };
> > +
> > +               reg_sensor: regulator@4 {
> 
> I know that you followed the existing pattern for regulators in this file, but it is
> not recommended to put regulators under "simple-bus".
> 
> I would suggest you to make a first patch of the series that removes all of the
> existing regulators from "simple-bus", then you add this series on top.
> 
> Then this regulator becomes:
> 
> reg_light_sensor: regulator-light-sensor {
> 
> > +                       compatible = "regulator-fixed";
> > +                       reg = <4>;
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&pinctrl_sensor_reg>;
> 
> pinctrl_sensor_reg is too generic. You could use pinctrl_light_sensor_reg

As this regulator controls all the sensors power on board, including light sensor,
magnetometer sensor and accelerometer sensors, so I think it is better to
use "pinctrl_sensors_reg" instead of "pinctrl_light_sensor_reg", so I use
" pinctrl_sensors_reg" in V2 patch.

> 
> > +                       regulator-name = "sensor-supply";
> > +                       regulator-min-microvolt = <3300000>;
> > +                       regulator-max-microvolt = <3300000>;
> > +                       gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>;
> > +                       enable-active-high;
> > +                       regulator-always-on;
> > +               };
> >         };
> >
> >         gpio-keys {
> > @@ -420,6 +433,15 @@
> >                 interrupts = <7 2>;
> >                 wakeup-gpios = <&gpio6 7 0>;
> >         };
> > +
> > +       isl29023@44 {
> 
> Node names should be generic, so: light-sensor@44

Improved it in V2 patch, and also apply the patch you sent me as
the first patch, please help review them, thanks.

Anson.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ