Re: [PATCH 2/4] i2c: i2c-ocores: Use reg-shift property

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

 



On Fri, Jun 08, 2012 at 01:41:36PM +0200, Peter Korsgaard wrote:
> >>>>> "J" == Jayachandran C <jayachandranc@xxxxxxxxxxxxxxxxx> writes:
> 
>  J> From: Ganesan Ramalingam <ganesanr@xxxxxxxxxxxx>
>  J> Deprecate 'regstep' property and use the standard 'reg-shift' property
>  J> for register offset shifts. 'regstep' will still be supported as an
>  J> optional property, but will give a warning when used.
> 
> ..
>  
>  J>  struct ocores_i2c_platform_data {
>  J> -	u32 regstep;   /* distance between registers */
>  J> -	u32 clock_khz; /* input clock in kHz */
>  J> -	u8 num_devices; /* number of devices in the devices list */
>  J> +	u32 reg_shift;		/* register offset shift value */
>  J> +	u32 clock_khz;		/* input clock in kHz */
>  J> +	u8 num_devices;		/* number of devices in the devices list */
>  J>  	struct i2c_board_info const *devices; /* devices connected to the bus */
>  J>  };
> 
> Why not just keep this change to the dt bindings, instead of risking
> breaking stuff for platform drivers as well? There's no conceptual
> reason why reg_shift is any better than regstep.

This is to keep the names and meanings of platform property and DT
property same. Having two ways (setting regstep in platform code or
setting 'reg-shift' in DT) of specifying the same parameter is not
a nice.

There is only one user of this API in the whole kernel tree, which
is fixed as part of the patchset.

Also we make sure that we do not break existing DTBs by still accepting
'regstep' property.

Regards,
JC.

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