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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 Jan 2018 10:38:38 +0100
From:   Ladislav Michl <ladis@...ux-mips.org>
To:     Filip Matijević <filip.matijevic.pz@...il.com>
Cc:     Pavel Machek <pavel@....cz>, lgirdwood@...il.com,
        broonie@...nel.org, robh+dt@...nel.org, mark.rutland@....com,
        perex@...ex.cz, tiwai@...e.com, bhumirks@...il.com,
        alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, pali.rohar@...il.com, sre@...nel.org,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-omap@...r.kernel.org, tony@...mide.com, khilman@...nel.org,
        aaro.koskinen@....fi, ivo.g.dimitrov.75@...il.com,
        patrikbachan@...il.com, serge@...lyn.com, abcloriens@...il.com,
        clayton@...ftyguy.net, martijn@...xit.nl,
        sakari.ailus@...ux.intel.com
Subject: Re: [PATCH] sound/tlv320dac33: Add device tree support

On Tue, Jan 30, 2018 at 10:11:02AM +0100, Filip Matijević wrote:
> Hi,
> 
> On 01/30/2018 09:53 AM, Pavel Machek wrote:
> > On Tue 2018-01-30 09:34:46, Ladislav Michl wrote:
> >> On Tue, Jan 30, 2018 at 12:33:01AM +0100, Pavel Machek wrote:
> >>> On Tue 2018-01-30 00:20:31, Ladislav Michl wrote:
> >>>> On Tue, Jan 30, 2018 at 12:05:39AM +0100, Pavel Machek wrote:
> >>>>>
> >>>>> This adds device tree support to tlv320dac33.c.
> >>>>>
> >>>>> Signed-off-by: Pavel Machek <pavel@....cz>
> >>>>>
> >>>>> diff --git a/Documentation/devicetree/bindings/sound/tlv320dac33.txt b/Documentation/devicetree/bindings/sound/tlv320dac33.txt
> >>>>> new file mode 100644
> >>>>> index 0000000..6cbd311
> >>>>> --- /dev/null
> >>>>> +++ b/Documentation/devicetree/bindings/sound/tlv320dac33.txt
> >>>>> @@ -0,0 +1,32 @@
> >>>>> +Texas Instruments - tlv320dac33 Codec module
> >>>>> +
> >>>>> +The tlv320dac33 serial control bus communicates through I2C protocols.
> >>>>> +
> >>>>> +Required properties:
> >>>>> +
> >>>>> +- compatible - "ti,tlv320dac33"
> >>>>> +- reg - I2C slave address
> >>>>> +
> >>>>> +Optional properties:
> >>>>> +
> >>>>> +- power-gpios - gpio pin to power the device, active high
> >>>>
> >>>> While driver used gpio in platform data, isn't it more likely
> >>>> regulator which powers device?
> >>>
> >>>                 power-gpios = <&gpio2 28 0>; /* gpio_60 */
> >>>
> >>> Looks like GPIO to me -- example is from Nokia N9. So this appears to
> >>> be correct.
> >>
> >> Device datasheet doesn't list any pin which looks like "power-gpio"
> >> http://www.ti.com/lit/ds/symlink/tlv320dac32.pdf
> >> Unfortunately I do not know much about N9, but was able to find Nokia 5610
> >> scheme to get clue how could be tlv320dac33 hardwired (see page 2):
> >> http://mastermobile.spb.ru/service/nokia_5610_rm-242_service_schematics.pdf
> >> Here AVDD is powered by LP3985 voltage regulator which is enabled using
> >> VEN pin which might be connected to gpio. Or there could be completely
> >> different voltage regulator with different controls. And since Linux
> >> already has voltage regulator class, lets not limit ourselves to gpio
> >> pins.
> > 
> > Well, notice I'm converting existing driver to device tree. And that
> > one already has GPIO dependency. It is possible that more work needs
> > to be done there, but that should not be a reason to delay this. Feel
> > free to help.

Adding DT properties that need to be maintained for compatibility reasons
is a bad idea and very good reason to delay merging unfinished stuff.
And meanwhile it turned out it is not power-gpio :)

> According to N9 schematics
> http://www.s-manuals.com/manuals/phone/nokia/nokia_n9_rm-696_service_schematics_v1.pdf
> it's in fact GPIO pin that is connected to reset line (labeled
> CODEC_RST). So calling it "power" might be misleading, but the driver
> code is quite clear as it labels that GPIO as "tlv320dac33 reset"

Thanks a lot! So now it is clear that gpio is connected to codec's nRESET pin,
therefore "reset-gpios" property seems reasonable here.

	ladis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ