On Thu, Mar 20, 2008 at 11:18:40PM +0900, Magnus Damm wrote:
> +static void sh_mobile_i2c_setup_channel(struct platform_device *dev)
> +{
> + struct sh_mobile_i2c_data *pd = platform_get_drvdata(dev);
> + unsigned long peripheral_clk = CONFIG_SH_PCLK_FREQ;
> + u_int32_t num;
> + u_int32_t denom;
> + u_int32_t tmp;
> +
Use clk_get() and friends here for the module clock. This should
absolutely not be hardcoded, especially as it can be scaled by the clock
framework, and the i2c clock will need to rebalance itself to account for
that. Any driver that references CONFIG_SH_PCLK_FREQ is utterly broken.
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c