Re: [PATCH 2/3] i2c-mpc: add support for the MPC512x processors from Freescale

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

 



Ben Dooks wrote:
> On Mon, Jan 25, 2010 at 04:15:09PM +0100, Wolfram Sang wrote:
>>>>>  
>>>>> -static void __devinit mpc_i2c_setclock_52xx(struct device_node *node,
>>>>> -					    struct mpc_i2c *i2c,
>>>>> -					    u32 clock, u32 prescaler)
>>>>> +static void __devinit mpc_i2c_setup_52xx(struct device_node *node,
>>>>> +					 struct mpc_i2c *i2c,
>>>>> +					 u32 clock, u32 prescaler)
>>>>>  {
>>>>>  	int ret, fdr;
>>>>>  
>>>>> +	if (clock == -1) {
>>>> Could we use 0 for 'no_clock'? This would make the above statement simply
>>> "0" is already used to maintain backward compatibility setting a safe
>>> divider.
>> Ah, now I see:
>>
>> 'clock == -1' means 'preserve clocks' (and is checked here in mpc_i2c_setup_52xx())
>> 'clock ==  0' means 'safe divider' (and is checked in mpc_i2c_get_fdr_52xx())
> 
> hmm, sounds like a job for a  #define or similar.

See v2 of this patch.

Wolfgang.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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