On 15 June 2011 13:31, Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx> wrote: > Hi Thomas, > > On 06/15/2011 08:14 AM, Thomas Abraham wrote: >> Hi Sylwester, >> >> On 11 June 2011 22:10, Sylwester Nawrocki <snjw23@xxxxxxxxx> wrote: >>> Hello, >>> >>> On 06/10/2011 10:15 AM, Anand Kumar N wrote: >>>> From: Jonghun Han<jonghun.han@xxxxxxxxxxx> >>>> >>>> This patch adds struct s3c_fb_driverdata s3c_fb_data_exynos4 for EXYNOS4. >>>> The clk_type is added to distinguish clock type in it and lcd_clk is added >>>> in structure s3c_fb to calculate divider for lcd panel. <snip> >> >> Sorry, I am not quite sure if I understand the problem here. For >> instance, all Samsung SoC's and each instance of i2c device in a SoC, >> use the same con_id for the i2c 'struct clock' instance. The con_id is >> 'i2c'. The i2c driver uses the con_id 'i2c' to lookup the 'struct >> clock' instance and it works for all Samsung SoC's and all instances >> of i2c device in the SoC. >> >> Is your point different than what I understand? Please help. > > I appreciate your efforts in converting all Samsung platforms to clkdev. > > With the above I2C example I was trying to illustrate the additional > level of indirection that is present in case of OMAP clock mappings, > comparing to your implementation. > As long as IP clock names are same among various SoC there is no issue > at all with your clk lookup approach. > But this is already not the case with LCD controller IP. > On S3C series the IP bus clock name is "lcd" while on S5P series it's "fimd". > There is a common framebuffer driver for S3C and S5P SoCs. > It just does not look right to me to be adding in the driver switch/case > for the clock names. I thought clkdev is meant to resolve such differences. > > Then how it would be possible to map those clocks into single con_id with > your patches? E.g. > > S3C clk | S5P clk | con_id > --------------------------- > "lcd" | "fimd" | "lcd" ? Ok. Thanks for clarifying this point. In this case, maybe we could use the clk_add_alias API. With this API, we can have a instance of clock by name 'fimd' and then create a clkdev alias by name 'lcd' in the machine code. The driver can then continue to lookup with 'lcd' as the con_id. I understand that this is just a workaround. The real problem lies in the fact that the clock name have not been consistent across various SoC's. Thanks, Thomas. > > I believe there will come more differences like that in the future. > > Regards, > Sylwester > >> Thanks, >> Thomas. >>> >>> That said I wouldn't go for a "devname" in struct clk, just create >>> an additional table matching device names, con_id and struct clk and >>> use it while registering clk_lookup items into clkdev. > ... >>> [1] http://www.spinics.net/lists/arm-kernel/msg127901.html >>> http://www.spinics.net/lists/arm-kernel/msg127907.html > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html