From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Grant Likely <grant.likely@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <rob.herring@calxeda.com>,
Zhang Rui <rui.zhang@intel.com>,
Linux I2C <linux-i2c@vger.kernel.org>,
ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
Wolfram Sang <wsa@the-dreams.de>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices
Date: Wed, 16 Oct 2013 10:16:29 +0300 [thread overview]
Message-ID: <525E3D4D.1040102@linux.intel.com> (raw)
In-Reply-To: <CACxGe6v3JHLKHqBXux=1mgm227S2dLafaqohKvzqsw1uo6tHyA@mail.gmail.com>
On 10/16/2013 03:04 AM, Grant Likely wrote:
> On Wed, Oct 16, 2013 at 12:47 AM, Rafael J. Wysocki<rjw@sisk.pl> wrote:
>> On Tuesday, October 15, 2013 04:31:43 PM Greg Kroah-Hartman wrote:
>>> On Tue, Oct 15, 2013 at 11:24:01PM +0200, Rafael J. Wysocki wrote:
>>>> On Tuesday, October 15, 2013 01:48:29 PM Greg Kroah-Hartman wrote:
>>>>> On Tue, Oct 15, 2013 at 10:37:02PM +0200, Rafael J. Wysocki wrote:
>>>>>> On Tuesday, October 15, 2013 07:44:44 PM Zhang Rui wrote:
>>>>>>> I have a question about the device "uevent" and "modalias" sysfs
>>>>>>> attributes.
>>>>>>> what is the relationship between these two?
>>>>>>> Am I right to say that, if there is the "MODALIAS" field in uevent file,
>>>>>>> this field must be consistent with the content in "modalias" attribute?
>>>>> Well, if it isn't, it's pretty pointless, right?
>>>>>>> static int platform_uevent(struct device *dev, struct kobj_uevent_env
>>>>>>> *env)
>>>>>>> {
>>>>>>> struct platform_device *pdev = to_platform_device(dev);
>>>>>>> int rc;
>>>>>>>
>>>>>>> /* Some devices have extra OF data and an OF-style MODALIAS */
>>>>>>> rc = of_device_uevent_modalias(dev, env);
>>>>>>> if (rc != -ENODEV)
>>>>>>> return rc;
>>>>>>>
>>>>>>> add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX,
>>>>>>> pdev->name);
>>>>>>> return 0;
>>>>>>> }
>>>>>>>
>>>>>>> This means that the OF-style MODALIAS is not shown in "modalias" sysfs
>>>>>>> attribute.
>>>>>>> is this a bug?
Here is an example from one DT based system:
cat /sys/bus/platform/devices/48070000.i2c/uevent
DRIVER=omap_i2c
OF_NAME=i2c
OF_FULLNAME=/ocp/i2c@48070000
OF_COMPATIBLE_0=ti,omap4-i2c
OF_COMPATIBLE_N=1
MODALIAS=of:Ni2cT<NULL>Cti,omap4-i2c
cat /sys/bus/platform/devices/48070000.i2c/modalias
platform:48070000.i2c
And a device on that I2C bus:
cat /sys/bus/platform/devices/rtc.11/uevent
DRIVER=twl_rtc
OF_NAME=rtc
OF_FULLNAME=/ocp/i2c@48070000/twl@48/rtc
OF_COMPATIBLE_0=ti,twl4030-rtc
OF_COMPATIBLE_N=1
MODALIAS=of:NrtcT<NULL>Cti,twl4030-rtc
cat /sys/bus/platform/devices/rtc.11/modalias
platform:rtc.11
Unfortunately I cannot debug above example further at the moment is
there failing or needless modprobe calls. Maybe device tree experts know
better?
--
Jarkko
next prev parent reply other threads:[~2013-10-16 7:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 14:17 [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices Jarkko Nikula
[not found] ` <1381414669-26115-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-11 14:49 ` Mika Westerberg
[not found] ` <20131011144946.GS3521-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-11 22:16 ` Rafael J. Wysocki
2013-10-12 5:04 ` Mika Westerberg
[not found] ` <20131012050413.GY3521-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-12 13:45 ` Rafael J. Wysocki
[not found] ` <2878883.SYGmCkS5Bt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-10-12 16:18 ` Mika Westerberg
2013-10-14 6:45 ` Jarkko Nikula
[not found] ` <525B9321.5000906-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-14 8:16 ` Mika Westerberg
2013-10-14 6:34 ` Jarkko Nikula
2013-10-14 8:13 ` Mika Westerberg
2013-10-14 9:23 ` Zhang Rui
2013-10-14 11:18 ` Jarkko Nikula
2013-10-14 12:47 ` Zhang Rui
2013-10-15 11:44 ` Zhang Rui
2013-10-15 20:37 ` Rafael J. Wysocki
[not found] ` <12043671.FjbAvIiH5B-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-10-15 20:48 ` Greg Kroah-Hartman
2013-10-15 21:24 ` Rafael J. Wysocki
2013-10-15 23:31 ` Greg Kroah-Hartman
2013-10-15 23:47 ` Rafael J. Wysocki
2013-10-16 0:04 ` Grant Likely
[not found] ` <CACxGe6v3JHLKHqBXux=1mgm227S2dLafaqohKvzqsw1uo6tHyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-16 0:10 ` Greg Kroah-Hartman
2013-10-16 7:16 ` Jarkko Nikula [this message]
[not found] ` <20131015204829.GA5212-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-10-15 21:40 ` Rafael J. Wysocki
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=525E3D4D.1040102@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@sisk.pl \
--cc=rob.herring@calxeda.com \
--cc=rui.zhang@intel.com \
--cc=wsa@the-dreams.de \
/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.