* Re: [patch] i2c: announce SMBus host controllers
[not found] ` <200712201801.28227.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
@ 2007-12-22 16:10 ` Jean Delvare
[not found] ` <e3i3Vo4v.1198339842.7760000.khali-IO4AeUl/lkuWVfeAwA7xHQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2007-12-22 16:10 UTC (permalink / raw)
To: bjorn.helgaas-VXdhtT5mjnY; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA
Hi Bjorn,
Le 21/12/2007, Bjorn Helgaas a écrit:
>Would you consider adding a patch like this to your i2c tree?
>Unfortunately, I don't think I have hardware for any of these
>devices, so all I have done is compiled this.
>(...)
>i2c: announce SMBus host controllers
>
>Note where we find SMBus host controllers and what resources they use.
I like the idea. The information printed is somewhat redundant with
/proc/ioports but sometimes it's useful to see the information in dmesg
directly, and having a common string to grep for should be convenient as
well. Just a couple comments:
* i2c-i810, i2c-prosavage, i2c-savage4 and i2c-voodoo3 are NOT SMBus host
controller drivers. They do I2C/DDC over GPIO for graphics adapters. I
don't think that you really need to know about the resources they use,
they are not candidates for conflicts with ACPI / BIOS / whatever. And 3
out of 4 are deprecated, so all in all they are probably just not worth
modifying.
* I think that you should make sure that the device has been successfully
registered before you print the message, otherwise it might be
confusing. I only looked at i2c-pasemi and scx200_acb and for both
drivers you print the message at a point where a failure could still
happen. Please double-check for all drivers, adjust as needed and
resubmit.
I can test the i2c-i801 driver now and i2c-viapro and i2c-piix4 later.
--
Jean Delvare
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] i2c: announce SMBus host controllers
[not found] ` <e3i3Vo4v.1198339842.7760000.khali-IO4AeUl/lkuWVfeAwA7xHQ@public.gmane.org>
@ 2007-12-23 3:42 ` Bjorn Helgaas
2008-01-02 23:35 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2007-12-23 3:42 UTC (permalink / raw)
To: Jean Delvare; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA
On Saturday 22 December 2007 9:10:44 am Jean Delvare wrote:
> Hi Bjorn,
>
> Le 21/12/2007, Bjorn Helgaas a écrit:
> >Would you consider adding a patch like this to your i2c tree?
> >Unfortunately, I don't think I have hardware for any of these
> >devices, so all I have done is compiled this.
> >(...)
> >i2c: announce SMBus host controllers
> >
> >Note where we find SMBus host controllers and what resources they use.
>
> I like the idea. The information printed is somewhat redundant with
> /proc/ioports but sometimes it's useful to see the information in dmesg
> directly, and having a common string to grep for should be convenient as
> well. Just a couple comments:
>
> * i2c-i810, i2c-prosavage, i2c-savage4 and i2c-voodoo3 are NOT SMBus host
> controller drivers. They do I2C/DDC over GPIO for graphics adapters. I
> don't think that you really need to know about the resources they use,
> they are not candidates for conflicts with ACPI / BIOS / whatever. And 3
> out of 4 are deprecated, so all in all they are probably just not worth
> modifying.
>
> * I think that you should make sure that the device has been successfully
> registered before you print the message, otherwise it might be
> confusing. I only looked at i2c-pasemi and scx200_acb and for both
> drivers you print the message at a point where a failure could still
> happen. Please double-check for all drivers, adjust as needed and
> resubmit.
>
> I can test the i2c-i801 driver now and i2c-viapro and i2c-piix4 later.
Thanks for the comments! My work machine is powered off for the
holidays, so I'll rework the patch after the new year.
Bjorn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] i2c: announce SMBus host controllers
[not found] ` <e3i3Vo4v.1198339842.7760000.khali-IO4AeUl/lkuWVfeAwA7xHQ@public.gmane.org>
2007-12-23 3:42 ` Bjorn Helgaas
@ 2008-01-02 23:35 ` Bjorn Helgaas
[not found] ` <200801021635.04702.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2008-01-02 23:35 UTC (permalink / raw)
To: Jean Delvare; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA
On Saturday 22 December 2007 09:10:44 am Jean Delvare wrote:
> Le 21/12/2007, Bjorn Helgaas a écrit:
> >Would you consider adding a patch like this to your i2c tree?
> >Unfortunately, I don't think I have hardware for any of these
> >devices, so all I have done is compiled this.
> >(...)
> >i2c: announce SMBus host controllers
> >
> >Note where we find SMBus host controllers and what resources they use.
> ...
> * i2c-i810, i2c-prosavage, i2c-savage4 and i2c-voodoo3 are NOT SMBus host
> controller drivers. They do I2C/DDC over GPIO for graphics adapters. I
> don't think that you really need to know about the resources they use,
> they are not candidates for conflicts with ACPI / BIOS / whatever. And 3
> out of 4 are deprecated, so all in all they are probably just not worth
> modifying.
I removed the patches for these drivers.
> * I think that you should make sure that the device has been successfully
> registered before you print the message, otherwise it might be
> confusing. I only looked at i2c-pasemi and scx200_acb and for both
> drivers you print the message at a point where a failure could still
> happen. Please double-check for all drivers, adjust as needed and
> resubmit.
Take a look at i2c-ali1535.c. I put the new printk in ali1535_setup(),
which does PCI initialization, even though a failure could happen later
in i2c_add_adapter().
I picked that because putting the new printk in ali1535_probe() would
mean:
- the printk would be far removed from the request_region(), so it's
a little harder to be sure the "ali1535_smba + ALI1535_SMB_IOSIZE - 1"
expression matches,
- I wouldn't be able print the SMBREV value, and
- I'd have to add a temporary to check the return from
i2c_add_adapter() instead of just returning it directly,
I'd still be glad to change them if you prefer. I just want to do
them all the same (either all before or all after i2c_add_adapter()).
Let me know your preference.
Bjorn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] i2c: announce SMBus host controllers
[not found] ` <200801021635.04702.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
@ 2008-01-04 17:44 ` Jean Delvare
2008-01-04 19:03 ` Jean Delvare
1 sibling, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2008-01-04 17:44 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA
Hi Bjorn,
On Wed, 2 Jan 2008 16:35:04 -0700, Bjorn Helgaas wrote:
> On Saturday 22 December 2007 09:10:44 am Jean Delvare wrote:
> > * I think that you should make sure that the device has been successfully
> > registered before you print the message, otherwise it might be
> > confusing. I only looked at i2c-pasemi and scx200_acb and for both
> > drivers you print the message at a point where a failure could still
> > happen. Please double-check for all drivers, adjust as needed and
> > resubmit.
>
> Take a look at i2c-ali1535.c. I put the new printk in ali1535_setup(),
> which does PCI initialization, even though a failure could happen later
> in i2c_add_adapter().
>
> I picked that because putting the new printk in ali1535_probe() would
> mean:
> - the printk would be far removed from the request_region(), so it's
> a little harder to be sure the "ali1535_smba + ALI1535_SMB_IOSIZE - 1"
> expression matches,
> - I wouldn't be able print the SMBREV value, and
> - I'd have to add a temporary to check the return from
> i2c_add_adapter() instead of just returning it directly,
>
> I'd still be glad to change them if you prefer. I just want to do
> them all the same (either all before or all after i2c_add_adapter()).
> Let me know your preference.
If moving the message makes the code mode complex, then I agree that
you shouldn't do that. After all, i2c_add_adapter() is very unlikely to
fail, and if it does, I certainly hope that it'll clearly show in the
kernel log so that no confusion is possible.
So just do what you think is best and I'll take that.
Thanks,
--
Jean Delvare
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] i2c: announce SMBus host controllers
[not found] ` <200801021635.04702.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2008-01-04 17:44 ` Jean Delvare
@ 2008-01-04 19:03 ` Jean Delvare
1 sibling, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2008-01-04 19:03 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA
Oh BTW your patch yields the following warning on x86_64:
drivers/i2c/busses/i2c-i801.c: In function "i801_probe":
drivers/i2c/busses/i2c-i801.c:669: warning: format "%lx" expects type "long unsigned int", but argument 5 has type "long long unsigned int"
Please fix in the next iteration of your patch.
--
Jean Delvare
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-04 19:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200712201801.28227.bjorn.helgaas@hp.com>
[not found] ` <200712201801.28227.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2007-12-22 16:10 ` [patch] i2c: announce SMBus host controllers Jean Delvare
[not found] ` <e3i3Vo4v.1198339842.7760000.khali-IO4AeUl/lkuWVfeAwA7xHQ@public.gmane.org>
2007-12-23 3:42 ` Bjorn Helgaas
2008-01-02 23:35 ` Bjorn Helgaas
[not found] ` <200801021635.04702.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2008-01-04 17:44 ` Jean Delvare
2008-01-04 19:03 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox