[PATCH 00/13] media: atmel-isi: extract the hw releated functions into structure
Josh Wu
rainyfeeling at gmail.com
Thu Jan 21 06:19:22 PST 2016
Hi, Ludovic
2016-01-19 22:52 GMT+08:00 Ludovic Desroches <ludovic.desroches at atmel.com>:
>
> Hi Josh,
>
> On Mon, Jan 18, 2016 at 08:21:36PM +0800, Josh Wu wrote:
> > This series refactor the atmel-isi drvier. In the meantime, extract all
> > the hardware related functions, and made it as function table. Also add
> > some hardware data.
> >
> > All those hardware functions, datas are defined with the compatible
> > string.
> >
> > In this way, it is easy to add another compatible string for new
> > hardware support.
>
> What is the goal of these patches? I mean is it to ease the support of
> ISC?
yes, I think these patches can make it easy to support ISC. As after
those patches, we can reuse the main framework, and just replace the
hardware operations to support ISC. (the patches are queued yet, I
would like to get some feedback before do such changes.)
>
>
> Discussing with Songjun, I understand that he wanted to have one driver
> for ISI and one for ISC but I have the feeling that your patches go in
> the opposite direction. What is your mind about this?
In my point of view, I prefer to use one driver to support both ISI
and ISC hardware. That would reduce many duplicated code. In the
meantime, using the different compatible string with different
hardware operation functions table can make ISC work well and also can
support further hardware IP.
What's your thought about this?
Best Regards,
Josh Wu
>
> Thanks
>
> Regards
>
> Ludovic
>
> >
> >
> > Josh Wu (13):
> > atmel-isi: use try_or_set_fmt() for both set_fmt() and try_fmt()
> > atmel-isi: move the is_support() close to try/set format function
> > atmel-isi: add isi_hw_initialize() function to handle hw setup
> > atmel-isi: move the cfg1 initialize to isi_hw_initialize()
> > atmel-isi: add a function: isi_hw_wait_status() to check ISI_SR status
> > atmel-isi: check ISI_SR's flags by polling instead of interrupt
> > atmel-isi: move hw code into isi_hw_initialize()
> > atmel-isi: remove the function set_dma_ctrl() as it just use once
> > atmel-isi: add a function start_isi()
> > atmel-isi: reuse start_dma() function in isi interrupt handler
> > atmel-isi: add hw_uninitialize() in stop_streaming()
> > atmel-isi: use union for the fbd (frame buffer descriptor)
> > atmel-isi: use an hw_data structure according compatible string
> >
> > drivers/media/platform/soc_camera/atmel-isi.c | 529 ++++++++++++++------------
> > 1 file changed, 277 insertions(+), 252 deletions(-)
> >
> > --
> > 1.9.1
> >
More information about the linux-arm-kernel
mailing list