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: <045185e0-927e-f004-2ec6-44205e5f6c13@redhat.com>
Date:   Mon, 4 Dec 2017 11:29:31 +0100
From:   Hans de Goede <hdegoede@...hat.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Jonathan Cameron <jic23@...nel.org>
Cc:     Jeremy Cline <jeremy@...ine.org>, Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Lars Kellogg-Stedman <lars@...bit.com>,
        Steven Presser <steve@...ssers.name>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Wolfram Sang <wsa@...-dreams.de>
Subject: Re: [PATCH 2/2] iio: accel: bmc150: Check for a second ACPI device
 for BOSC0200

Hi,

On 04-12-17 10:58, Mika Westerberg wrote:
> On Sat, Dec 02, 2017 at 12:19:27PM +0000, Jonathan Cameron wrote:
>> On Wed, 29 Nov 2017 22:31:12 +0000
>> Jeremy Cline <jeremy@...ine.org> wrote:
>>
>>> Some BOSC0200 acpi_device-s describe two accelerometers in a single ACPI
>>> device. Check for a companion device and handle a second i2c_client
>>> if it is present.
>>
>> + Mika and Wolfram - please cc them on anything odd and i2c / ACPI related.
>> (I like to share the pain)
>>
>> My usual question, just out of curiosity as we have to cope with this
>> fun anyway.  Are you actually allowed to do this under the ACPI spec
>> or not?  I would assume an acpi device is supposed to be just that A
>> device...  I fall asleep every time I try to read that spec ;)
> 
> Yes, it is allowed. Typically you have an ACPI device and it can have
> multiple I2cSerialBus() connections.
> 
> Linux ACPI/I2C core then picks the first one and creates i2c_client from
> that but the additional connections need to be created by the driver in
> question.
> 
> BTW, there is a function i2c_new_secondary_device() that is supposed to
> be used for this but it does not have ACPI support yet (maybe it is good
> time to add it now, with this patch series?)

i2c_new_secondary_device() is for a different purpose, this is for when
a single i2c device listens on multiple addresses and the driver wants
separate i2c_client-s to use to talk to each address.

In this case there are 2 separate devices, not a single device listening
on multiple addresses.  Something like i2c_new_secondary_device() ACPI
support might be useful for i2c devices where a single device / "IC" listens
on multiple addresses and all these addresses are listed in the ACPI resource
table, but not for this specific case.

Regards,

Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ