RE: [PATCH 03/15] [media] marvell-ccic: add clock tree support for marvell-ccic driver

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

 



Hello Guennadi,

Thanks for your suggestion, please see my comments below.

Best Regards,
Libin 

>>-----Original Message-----
>>From: Guennadi Liakhovetski [mailto:g.liakhovetski@xxxxxx]
>>Sent: Tuesday, 27 November, 2012 18:50
>>To: Albert Wang
>>Cc: corbet@xxxxxxx; linux-media@xxxxxxxxxxxxxxx; Libin Yang
>>Subject: Re: [PATCH 03/15] [media] marvell-ccic: add clock tree support for marvell-ccic
>>driver
>>
>>> +		mcam->clk_num = pdata->clk_num;
>>> +	} else {
>>> +		for (i = 0; i < pdata->clk_num; i++) {
>>> +			if (mcam->clk[i]) {
>>> +				clk_put(mcam->clk[i]);
>>> +				mcam->clk[i] = NULL;
>>> +			}
>>> +		}
>>> +		mcam->clk_num = 0;
>>> +	}
>>> +}
>>
>>Don't think I like this. IIUC, your driver should only try to use clocks, that it knows about,
>>not some random clocks, passed from the platform data. So, you should be using explicit
>>clock names. In your platform data you can set whether a specific clock should be used or
>>not, but not pass clock names down. Also you might want to consider using devm_clk_get()
>>and be more careful with error handling.
>>
>OK, we will try to enhance it.

[Libin] Because there are some boards using mmp chip, and the clock names on different board may be totally different. And also this is why the clock number is not definite. To support more boards, the dynamic names are used instead of the static names.
>
>>>
>>>  static int mmpcam_probe(struct platform_device *pdev)  { @@ -290,6
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux