From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Srinivas Pandruvada
<srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Subject: Re: [PATCH 3/3] iio: ak8975: Added autodetect feature for ACPI
Date: Fri, 26 Dec 2014 11:53:03 +0000 [thread overview]
Message-ID: <549D4C1F.6050907@kernel.org> (raw)
In-Reply-To: <1418925641.4459.11.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
On 18/12/14 18:00, Srinivas Pandruvada wrote:
> On Thu, 2014-12-18 at 18:54 +0100, Lars-Peter Clausen wrote:
>> On 12/18/2014 06:30 PM, Srinivas Pandruvada wrote:
>>> On Thu, 2014-12-18 at 18:05 +0100, Lars-Peter Clausen wrote:
>>>> On 12/18/2014 05:52 PM, Srinivas Pandruvada wrote:
>>>>> On Thu, 2014-12-18 at 17:28 +0100, Lars-Peter Clausen wrote:
>>>>>> Added I2C to Cc.
>>>>>>
>>>>>> On 12/15/2014 10:19 PM, Srinivas Pandruvada wrote:
>>>>>>> Using i2c auto detect feature and auto device creation feature,
>>>>>>> enumerate ak8975 device, by checking their presence.
>>>>>>> This is needed because when this device sits behind an i2c mux, there
>>>>>>> is no way to define i2c mux in ACPI. This will enable ak8975 on
>>>>>>> windows based tablets/laptops running Linux when connected via a mux.
>>>>>>> Since DT model already can define an i2c mux and devices connected to
>>>>>>> it, this feature is only enabled for ACPI.
>>>>>>>
>>>>>>
>>>>>> This is quite a bit of a hack.
>>>>> Why?
>>>>> Auto detect is standard feature of i2c devices. This is using standard
>>>>> auto detect feature provided by the framework.
>>>>
>>>> Auto detect is ugly, slow and unreliable, it's kind of like the last straw
>>>> if nothing else works.
>>> That is true here. You can't enumerate this device by ACPI. As discussed
>>> before we created i2c mux in inv6050 so that we can use AK8975 in bypass
>>> mode. I added some API to create i2c device on this mux, which Wolfram
>>> didn't like. He wanted to enumerate using existing mechanisms.
>>
>> If there is only a single ACPI ID that says this is a INV6050 with a AK8975
>> attached then the way to handle this is to have a driver that binds to that id
>> and creates both devices.
> Which address you will create device also adapter here is i2c mux
> created by inv6050? You don't know i2c address of AK8975. To know AK8975
> i2c address, even ugly hack to parse propriety vendor ACPI data, which
> will change between to manufacturer.
>
This is odd enough, that I'd like a wider range of views on it.
Wolfram - was this the approach you had in mind?
>>
>> - Lars
>>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH 3/3] iio: ak8975: Added autodetect feature for ACPI
Date: Fri, 26 Dec 2014 11:53:03 +0000 [thread overview]
Message-ID: <549D4C1F.6050907@kernel.org> (raw)
In-Reply-To: <1418925641.4459.11.camel@spandruv-desktop.jf.intel.com>
On 18/12/14 18:00, Srinivas Pandruvada wrote:
> On Thu, 2014-12-18 at 18:54 +0100, Lars-Peter Clausen wrote:
>> On 12/18/2014 06:30 PM, Srinivas Pandruvada wrote:
>>> On Thu, 2014-12-18 at 18:05 +0100, Lars-Peter Clausen wrote:
>>>> On 12/18/2014 05:52 PM, Srinivas Pandruvada wrote:
>>>>> On Thu, 2014-12-18 at 17:28 +0100, Lars-Peter Clausen wrote:
>>>>>> Added I2C to Cc.
>>>>>>
>>>>>> On 12/15/2014 10:19 PM, Srinivas Pandruvada wrote:
>>>>>>> Using i2c auto detect feature and auto device creation feature,
>>>>>>> enumerate ak8975 device, by checking their presence.
>>>>>>> This is needed because when this device sits behind an i2c mux, there
>>>>>>> is no way to define i2c mux in ACPI. This will enable ak8975 on
>>>>>>> windows based tablets/laptops running Linux when connected via a mux.
>>>>>>> Since DT model already can define an i2c mux and devices connected to
>>>>>>> it, this feature is only enabled for ACPI.
>>>>>>>
>>>>>>
>>>>>> This is quite a bit of a hack.
>>>>> Why?
>>>>> Auto detect is standard feature of i2c devices. This is using standard
>>>>> auto detect feature provided by the framework.
>>>>
>>>> Auto detect is ugly, slow and unreliable, it's kind of like the last straw
>>>> if nothing else works.
>>> That is true here. You can't enumerate this device by ACPI. As discussed
>>> before we created i2c mux in inv6050 so that we can use AK8975 in bypass
>>> mode. I added some API to create i2c device on this mux, which Wolfram
>>> didn't like. He wanted to enumerate using existing mechanisms.
>>
>> If there is only a single ACPI ID that says this is a INV6050 with a AK8975
>> attached then the way to handle this is to have a driver that binds to that id
>> and creates both devices.
> Which address you will create device also adapter here is i2c mux
> created by inv6050? You don't know i2c address of AK8975. To know AK8975
> i2c address, even ugly hack to parse propriety vendor ACPI data, which
> will change between to manufacturer.
>
This is odd enough, that I'd like a wider range of views on it.
Wolfram - was this the approach you had in mind?
>>
>> - Lars
>>
>
>
next prev parent reply other threads:[~2014-12-26 11:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 21:19 [PATCH 0/3] Enable AK8963 conneted via INV6500 Srinivas Pandruvada
2014-12-15 21:19 ` [PATCH 1/3] iio: imu: inv_mpu6050: ACPI enumeration Srinivas Pandruvada
2014-12-26 12:39 ` Jonathan Cameron
2014-12-15 21:19 ` [PATCH 2/3] iio: imu: inv_mpu6050: Added adapter class Srinivas Pandruvada
2014-12-26 12:37 ` Jonathan Cameron
2014-12-31 10:25 ` Wolfram Sang
2015-01-01 12:27 ` Jonathan Cameron
2015-01-04 19:20 ` Jean Delvare
2014-12-15 21:19 ` [PATCH 3/3] iio: ak8975: Added autodetect feature for ACPI Srinivas Pandruvada
[not found] ` <1418678363-22437-4-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-12-18 16:28 ` Lars-Peter Clausen
2014-12-18 16:28 ` Lars-Peter Clausen
[not found] ` <549300A5.5080904-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-12-18 16:52 ` Srinivas Pandruvada
2014-12-18 16:52 ` Srinivas Pandruvada
[not found] ` <1418921521.740.282.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
2014-12-18 17:05 ` Lars-Peter Clausen
2014-12-18 17:05 ` Lars-Peter Clausen
[not found] ` <54930965.3030008-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-12-18 17:30 ` Srinivas Pandruvada
2014-12-18 17:30 ` Srinivas Pandruvada
[not found] ` <1418923812.4459.8.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
2014-12-18 17:54 ` Lars-Peter Clausen
2014-12-18 17:54 ` Lars-Peter Clausen
[not found] ` <549314C4.8090001-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-12-18 18:00 ` Srinivas Pandruvada
2014-12-18 18:00 ` Srinivas Pandruvada
[not found] ` <1418925641.4459.11.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
2014-12-26 11:53 ` Jonathan Cameron [this message]
2014-12-26 11:53 ` Jonathan Cameron
[not found] ` <549D4C1F.6050907-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-01-08 16:40 ` Wolfram Sang
2015-01-08 16:40 ` Wolfram Sang
2015-01-08 16:54 ` Srinivas Pandruvada
2015-01-08 16:54 ` Srinivas Pandruvada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=549D4C1F.6050907@kernel.org \
--to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.