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, 24 Feb 2015 22:01:26 +0800
From:	Chen-Yu Tsai <wens@...e.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Chen-Yu Tsai <wens@...e.org>, Wolfram Sang <wsa@...-dreams.de>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>, linux-i2c@...r.kernel.org,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	devicetree <devicetree@...r.kernel.org>,
	linux-sunxi <linux-sunxi@...glegroups.com>,
	Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation

On Tue, Feb 24, 2015 at 6:37 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Tuesday 24 February 2015 18:29:02 Chen-Yu Tsai wrote:
>>
>> +       rsb@...03400 {
>> +               compatible = "allwinner,sun8i-a23-rsb";
>> +               reg = <0x01f03400 0x400>;
>> +               interrupts = <0 39 4>;
>> +               clocks = <&apb0_gates 3>;
>> +               clock-frequency = <3000000>;
>> +               resets = <&apb0_rst 3>;
>> +
>> +               axp223: pmic@2d {
>> +                       compatible = "x-powers,axp223", "x-powers,axp221";
>> +                       reg = <0x2d>;
>> +                       allwinner,rsb-hw-addr = <0x3e3>;
>> +
>> +                       /* ... */
>> +               };
>> +       };
>
> The child node cannot have a 'reg' property if the parent does not
> have #address-cells/#size-cells. You should add these as mandatory
> properties in the list.

Oops. I'll add them. A few of the other i2c bindings seem to be missing
it as well. Probably why I missed it.

> I don't really understand the need for having two addresses (runtime
> and hardware). Could the runtime address be configured at runtime?

You can, though the driver doesn't support this. I don't think the
I2C subsystem allows arbitrary device insertion during normal
operation, but maybe i2c-dev? I've tried using different addresses
for devices so they do get changed during the probe phase, just
to be sure that the code works, and it's not just sitting at
the address the bootloader used.

In any case, the distinction is more like burnt-in or hardwired
addresses vs software configurable addresses.

> Alternatively, could you use #address-cells=<2> and put both into
> 'reg'?

I sort of looked into it, and it seems the I2C subsystem won't mind
the extra address cell. Maxime also asked whether we could use 2
addresses, possibly with a reg-names property. Using 2 cells is simpler
though.

I'm open to other options, but I'd like to get some input, especially
from the device tree maintainers, before I change it.


Regards,
ChenYu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ