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

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

 



> 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;
}

Or?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux