From: Jonathan Cameron <jic23@kernel.org>
To: Mike Mestnik <cheako@mikemestnik.net>,
Daniel Baluta <daniel.baluta@gmail.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Bastien Nocera <hadess@hadess.net>
Subject: Re: [PATCH] Asus T300CHI.
Date: Sun, 20 Sep 2015 20:08:35 +0100 [thread overview]
Message-ID: <55FF0433.6050900@kernel.org> (raw)
In-Reply-To: <CAF8px56ehuZxcP9EJ3d+M68CdYJKdkiaRs_g1+S8euiFKA5pkA@mail.gmail.com>
On 19/09/15 20:03, Mike Mestnik wrote:
> On Sat, Sep 19, 2015 at 1:48 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
>> On Fri, Sep 18, 2015 at 12:07 AM, Mike Mestnik <cheako@mikemestnik.net> wrote:
>>> Hello,
>>> I'm looking to know the result of adding ACPI support for a new
>>> tablet, the existing support shouldn't work because of a misplaced
>>> __init that causes the function to be removed prior to being called.
>>
>> Are you sure about this? It seems that the existing support doesn't work
>> because you have different product ids.
>>
> The driver worked much better prior to me adding the product ids. The
> sensors were exposed to sysfs and all the data they collected seemed
> correct to me. The big issue is that there is no software, even
> iio-sensor-proxy didn't know how to access the data.
Cc'd Bastien Nocera.
>
>>
>>> After applying this patch I feel that I've moved support for the
>>> T300CHI backwards. What should be the intended effect of using the
>>> ACPI interface?
>>>
>>> Index: linux-4.1.3/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
>>> ===================================================================
>>> --- linux-4.1.3.orig/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
>>> +++ linux-4.1.3/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
>>> @@ -23,27 +23,44 @@
>>> enum inv_mpu_product_name {
>>> INV_MPU_NOT_MATCHED,
>>> INV_MPU_ASUS_T100TA,
>>> + INV_MPU_ASUS_T300CHI,
>>> };
>>>
>>> static enum inv_mpu_product_name matched_product_name;
>>>
>>> -static int __init asus_t100_matched(const struct dmi_system_id *d)
>>> +static int asus_t100ta_matched(const struct dmi_system_id *d)
>>> {
>>> matched_product_name = INV_MPU_ASUS_T100TA;
>>>
>>> return 0;
>>> }
>>>
>>> +static int asus_t300chi_matched(const struct dmi_system_id *d)
>>> +{
>>> + matched_product_name = INV_MPU_ASUS_T300CHI;
>>> +
>>> + return 0;
>>> +}
>>> +
>>> static const struct dmi_system_id inv_mpu_dev_list[] = {
>>> {
>>> - .callback = asus_t100_matched,
>>> - .ident = "Asus Transformer Book T100",
>>> + .callback = asus_t100ta_matched,
>>> + .ident = "Asus Transformer Book T100TA",
>>> .matches = {
>>> DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC"),
>>> DMI_MATCH(DMI_PRODUCT_NAME, "T100TA"),
>>> DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
>>> },
>>> },
>>> + {
>>> + .callback = asus_t300chi_matched,
>>> + .ident = "Asus Transformer Book T300CHI",
>>> + .matches = {
>>> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC"),
>>> + DMI_MATCH(DMI_PRODUCT_NAME, "T300CHI"),
>>> + DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
>>> + },
>>> + },
>>> /* Add more matching tables here..*/
>>> {}
>>> };
>>> @@ -154,6 +171,7 @@ int inv_mpu_acpi_create_mux_client(struc
>>> dmi_check_system(inv_mpu_dev_list);
>>> switch (matched_product_name) {
>>> case INV_MPU_ASUS_T100TA:
>>> + case INV_MPU_ASUS_T300CHI:
>>> ret = asus_acpi_get_sensor_info(adev, st->client,
>>> &info);
>>> break;
>>
>> This looks good to me. Care to send a formal patch?
>>
> I would if the changes do what they are intended to do. With this
> patch applied there is no longer entries for the device in sysfs and
> iio-sensor-proxy is still unable to access the device. I'm wondering
> how I'd be able to know if this change worked?
>
>> thanks,
>> Daniel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2015-09-20 19:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 21:07 [PATCH] Asus T300CHI Mike Mestnik
2015-09-19 18:31 ` Mike Mestnik
2015-09-19 18:48 ` Daniel Baluta
2015-09-19 19:03 ` Mike Mestnik
2015-09-20 19:08 ` Jonathan Cameron [this message]
2015-09-20 22:42 ` Bastien Nocera
2015-09-20 22:55 ` Mike Mestnik
2015-09-21 14:26 ` Mike Mestnik
2015-09-21 19:46 ` Jonathan Cameron
2015-09-24 15:57 ` Mike Mestnik
2015-09-25 14:19 ` Srinivas Pandruvada
2015-09-25 16:40 ` Mike Mestnik
2015-09-21 19:47 ` Jonathan Cameron
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=55FF0433.6050900@kernel.org \
--to=jic23@kernel.org \
--cc=cheako@mikemestnik.net \
--cc=daniel.baluta@gmail.com \
--cc=hadess@hadess.net \
--cc=linux-iio@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).