From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v3 7/7] soc_camera: initial of code
Date: Fri, 06 Jun 2014 17:27:53 +0000 [thread overview]
Message-ID: <5391FA19.7070903@cogentembedded.com> (raw)
In-Reply-To: <1397471802-27216-8-git-send-email-ben.dooks@codethink.co.uk>
Hello.
On 04/14/2014 02:36 PM, Ben Dooks wrote:
> Add initial support for OF based soc-camera devices that may be used
> by any of the soc-camera drivers. The driver itself will need converting
> to use OF.
> These changes allow the soc-camera driver to do the connecting of any
> async capable v4l2 device to the soc-camera driver. This has currently
> been tested on the Renesas Lager board.
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Changes since v1:
> - Updated to make the i2c mclk name compatible with other
> drivers. The issue of having mclk which is not part of
> the drivers/clk interface is something that can be dealt
> with separately.
> ---
> drivers/media/platform/soc_camera/soc_camera.c | 117 ++++++++++++++++++++++++-
> 1 file changed, 116 insertions(+), 1 deletion(-)
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 4b8c024..c50ec5c 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
[...]
> @@ -1579,6 +1580,118 @@ static void scan_async_host(struct soc_camera_host *ici)
> #define scan_async_host(ici) do {} while (0)
> #endif
>
> +#ifdef CONFIG_OF
> +static int soc_of_bind(struct soc_camera_host *ici,
> + struct device_node *ep,
> + struct device_node *remote)
> +{
> + struct soc_camera_device *icd;
> + struct soc_camera_desc sdesc = {.host_desc.bus_id = ici->nr,};
> + struct soc_camera_async_client *sasc;
> + struct soc_camera_async_subdev *sasd;
> + struct v4l2_async_subdev **asd_array;
> + struct i2c_client *client;
> + char clk_name[V4L2_SUBDEV_NAME_SIZE];
> + int ret;
> +
> + /* alloacte a new subdev and add match info to it */
s/alloacte/allocate/
> + sasd = devm_kzalloc(ici->v4l2_dev.dev, sizeof(*sasd), GFP_KERNEL);
> + if (!sasd)
> + return -ENOMEM;
> +
> + asd_array = devm_kzalloc(ici->v4l2_dev.dev,
> + sizeof(struct v4l2_async_subdev **),
Hm, is this a correct size indeed?
> + client = of_find_i2c_device_by_node(remote);
> +
I don't think empty line is needed here...
> + if (client)
> + snprintf(clk_name, sizeof(clk_name), "%d-%04x",
> + client->adapter->nr, client->addr);
> + else
> + snprintf(clk_name, sizeof(clk_name), "of-%s",
> + of_node_full_name(remote));
[...]
WBR, Sergei
prev parent reply other threads:[~2014-06-06 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 10:36 [PATCH v3 7/7] soc_camera: initial of code Ben Dooks
2014-04-16 10:38 ` Josh Wu
2014-04-16 11:09 ` Ben Dooks
2014-04-16 11:28 ` Guennadi Liakhovetski
2014-04-26 17:07 ` Guennadi Liakhovetski
2014-04-28 2:57 ` Josh Wu
2014-05-03 16:44 ` Guennadi Liakhovetski
2014-05-15 21:01 ` Ben Dooks
2014-05-18 21:31 ` Guennadi Liakhovetski
2014-06-06 17:27 ` Sergei Shtylyov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5391FA19.7070903@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.