Re: [PATCH v2] i2c:at91: Add device tree property to set clock-frequency

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

 



> @@ -711,6 +711,7 @@ static int at91_twi_probe(struct platform_device *pdev)
>  	struct resource *mem;
>  	int rc;
>  	u32 phy_addr;
> +	int bus_clk_rate;
>  
>  	dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
>  	if (!dev)
> @@ -756,7 +757,12 @@ static int at91_twi_probe(struct platform_device *pdev)
>  			dev->use_dma = true;
>  	}
>  
> -	at91_calc_twi_clock(dev, TWI_CLK_HZ);
> +	rc = of_property_read_u32(dev->dev->of_node, "clock-frequency",
> +			&bus_clk_rate);

The function is named read_u32, so the variable used should be u32.

Attachment: signature.asc
Description: Digital signature


[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