Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1253410 > unrolled thread

Re: [PATCH 2/2] i2c: designware: enable High-speed mode for pcidrv

Started byXiang Wang <wangxfdu@gmail.com>
First post2015-10-22 03:50 +0200
Last post2015-10-23 22:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] i2c: designware: enable High-speed mode for pcidrv Xiang Wang <wangxfdu@gmail.com> - 2015-10-22 03:50 +0200
    Re: [PATCH 2/2] i2c: designware: enable High-speed mode for pcidrv Wolfram Sang <wsa@the-dreams.de> - 2015-10-23 22:10 +0200

#1253410 — Re: [PATCH 2/2] i2c: designware: enable High-speed mode for pcidrv

FromXiang Wang <wangxfdu@gmail.com>
Date2015-10-22 03:50 +0200
SubjectRe: [PATCH 2/2] i2c: designware: enable High-speed mode for pcidrv
Message-ID<qmdaW-486-13@gated-at.bofh.it>
2015-10-15 17:40 GMT+08:00 Andy Shevchenko <andriy.shevchenko@linux.intel.com>:
> On Thu, 2015-10-15 at 11:32 +0300, Jarkko Nikula wrote:
>> On 10/15/2015 08:46 AM, Xiang Wang wrote:
>> >
>> > In conclusion, we have 2 solutions to set the i2c controller speed
>> > mode (pci driver):
>> > 1) use hardcode value in pci driver
>> > 2) use frequency setting of "i2c device" in ACPI table (more
>> > flexible,
>> > but looks a bit strange)
>> >
>> > Do you have any preference/suggestions for above solutions? Thanks
>>
>> I don't think we can hard code especially the high-speed mode because
>>
>> most typically buses are populated with slower devices.
>>
>> Things are a bit more clear when ACPI provides timing parameters for
>> the
>> bus (for standard and fast speed modes at the moment in
>> i2c-designware-platdrv.c: dw_i2c_acpi_configure()) but still I think
>> the
>> ACPI namespace walk may be needed against potential BIOS
>> misconfigurations. For instance if it provides timing parameters for
>> all
>> speeds but there are devices with lower speed on the same bus.
>>
>> I'd take these timing parameters as configuration data for bus
>> features
>> but actual speed (speed bits in IC_CON register) is defined
>> separately.
>> To me it looks only way to achieve that is to pick slowest device
>> from
>> I2cSerialBus resource descriptors.
>
> Should it (ACPI walk) be done in PCI case as well? If so, then it needs
> to be done up to i2c-core. There you may adjust the bus speed whenever
> slave device is enumerated.
>
I think the "ACPI walk for bus speed" also works for PCI case. It'll
be good to do this in i2c-core.
By doing this we can get a minimum device speed for this bus. I2C bus
drivers can use this speed to set corresponding mode into i2c
controller.
Waiting for comments from others.

> For PCI case you have still to have hardcoded values and it should be
> maximum supported by the bus I think. When you have implemented above
> algorithm you may do this safely. Am I missing something?
Agree. It'll be safer to set a hardcoded maximum supported speed of
the bus for PCI case.
I2C bus driver can use MIN(speed_get_by_ACPI_walk,
hardcoded_max_supported_speed) for bus speed.

>
> --
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Intel Finland Oy



-- 
Regards,
Xiang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1254975

FromWolfram Sang <wsa@the-dreams.de>
Date2015-10-23 22:10 +0200
Message-ID<qmQOZ-3lW-13@gated-at.bofh.it>
In reply to#1253410

[Multipart message — attachments visible in raw view] — view raw

> > Should it (ACPI walk) be done in PCI case as well? If so, then it needs
> > to be done up to i2c-core. There you may adjust the bus speed whenever
> > slave device is enumerated.
> >
> I think the "ACPI walk for bus speed" also works for PCI case. It'll
> be good to do this in i2c-core.
> By doing this we can get a minimum device speed for this bus. I2C bus
> drivers can use this speed to set corresponding mode into i2c
> controller.
> Waiting for comments from others.
> 
> > For PCI case you have still to have hardcoded values and it should be
> > maximum supported by the bus I think. When you have implemented above
> > algorithm you may do this safely. Am I missing something?
> Agree. It'll be safer to set a hardcoded maximum supported speed of
> the bus for PCI case.
> I2C bus driver can use MIN(speed_get_by_ACPI_walk,
> hardcoded_max_supported_speed) for bus speed.

Do I read this correctly that you agreed on an alternative path so this
series can be discarded?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web