Re: [RFC PATCH] i2c: refactor parsing of timings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 26, 2020 at 12:00:42PM +0100, Wolfram Sang wrote:
> 
> > However, looking into the code, I would go a bit further (perhaps as a separate
> > change) and export parsing of clock-frequency, because tons of drivers only
> > need one property, i.e. clock-frequency out of firmware.
> 
> Cool idea. Could be easily something like this (typed from the top of my
> head):
> 
> static inline u32 i2c_parse_fw_bus_speed(struct device *dev)
> {
> 	u32 speed;
> 
> 	i2c_parse_timing(dev, "clock-frequency", &speed, I2C_MAX_STANDARD_MODE_FREQ, true);
> 
> 	return speed;
> }

Yes, looks like this, thanks!

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux