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]
Message-ID: <5716333D.1040106@metafoo.de>
Date:	Tue, 19 Apr 2016 15:31:41 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	Jean-Michel Hautbois <jhautbois@...il.com>,
	linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
	devicetree@...r.kernel.org, galak@...eaurora.org,
	ijc+devicetree@...lion.org.uk, mark.rutland@....com,
	pawel.moll@....com, robh+dt@...nel.org, wsa@...-dreams.de,
	laurent.pinchart@...asonboard.com,
	Jean-Michel Hautbois <jean-michel.hautbois@...-labs.com>
Subject: Re: [PATCH v2] i2c: Add generic support passing secondary devices
 addresses

On 04/19/2016 03:16 PM, Mika Westerberg wrote:
> On Tue, Apr 19, 2016 at 03:02:06PM +0200, Lars-Peter Clausen wrote:
>> On 04/19/2016 02:40 PM, Mika Westerberg wrote:
>>> On Mon, Apr 18, 2016 at 05:26:54PM +0200, Lars-Peter Clausen wrote:
>>>> A generic API by indexes wont work. The order between DT and ACPI will most
>>>> likely be different. I'd even assume that the order will be different with
>>>> ACPI for the same device on different platforms.
>>>
>>> Yes, unfortunately that might be possible.
>>>
>>>> If we want to support ACPI over the same interface drivers need to provide a
>>>> lookup table that maps a name to the index.
>>>
>>> Indeed something like we already have with GPIOs. The lookup table could
>>> be filled from names in _DSD where it is available.
>>
>> Does that mean you are OK with the patch as it is?
> 
> It is still not clear to me if this supports more than two addresses and
> if it does, how those are represented in DT and how the function can be
> used to fetch all those additional addresses.

It adds a standard API for dealing with devices that have more than one
address. It uses the normal way of specifying multiple (named) address in DT.

reg = <0xa>, <0xb>, <0xc>;
reg-names = "main", "aux1", "aux2";

The function the new i2c_new_secondary_device() function takes the name of
the address region and allocates a dummy I2C client for it, which can be
used to access that I2C part of the device that responds to that region. The
name is used to lookup the address from the name to address map.

- Lars

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ