Linux Media Controller development
 help / color / mirror / Atom feed
From: Todor Tomov <todor.tomov@linaro.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: jacopo mondi <jacopo@jmondi.org>,
	mchehab@kernel.org, hverkuil@xs4all.nl,
	laurent.pinchart@ideasonboard.com, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [v2,2/2] media: Add a driver for the ov7251 camera sensor
Date: Thu, 29 Mar 2018 13:09:18 +0300	[thread overview]
Message-ID: <6625da39-9f35-f0ae-e40c-8ae508018aae@linaro.org> (raw)
In-Reply-To: <20180329082923.e55pclvlclamnsqz@paasikivi.fi.intel.com>

Hi Sakari

On 29.03.2018 11:29, Sakari Ailus wrote:
> Hi Todor and Jacopo,
> 
> On Thu, Mar 29, 2018 at 10:50:10AM +0300, Todor Tomov wrote:
> ...
>>>> +static const struct of_device_id ov7251_of_match[] = {
>>>> +	{ .compatible = "ovti,ov7251" },
>>>> +	{ /* sentinel */ }
>>>> +};
>>>> +MODULE_DEVICE_TABLE(of, ov7251_of_match);
>>>> +
>>>> +static struct i2c_driver ov7251_i2c_driver = {
>>>> +	.driver = {
>>>> +		.of_match_table = of_match_ptr(ov7251_of_match),
>>>> +		.name  = "ov7251",
>>>> +	},
>>>> +	.probe  = ov7251_probe,
>>>> +	.remove = ov7251_remove,
>>>> +	.id_table = ov7251_id,
>>>
>>> As this driver depends on CONFIG_OF, I've been suggested to use probe_new and
>>> get rid of i2c id_tables.
>>
>> Yes, I'll do that.
> 
> The proposal sounds good to me but rather than adding CONFIG_OF dependency,
> I'd instead suggest changing the of_property_read_u32 to
> fwnode_property_read_u32; then the driver may work on ACPI based systems as
> well. 

Ok.

> There's another change needed, too, which is not using of_match_ptr
> macro, but instead assigning the of_match_table unconditionally.

In that case the MODULE_DEVICE_TABLE(i2c, ...) is again not needed?
And matching will be again via of_match_table?

> 
> Up to you.
> 

Thank you for your help!
 
Best regards,
Todor Tomov

  reply	other threads:[~2018-03-29 10:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  4:14 [PATCH v2 0/2] Add support for ov7251 camera sensor Todor Tomov
2018-03-23  4:14 ` [PATCH v2 1/2] dt-bindings: media: Binding document for OV7251 " Todor Tomov
2018-03-29  8:24   ` Sakari Ailus
2018-03-23  4:14 ` [PATCH v2 2/2] media: Add a driver for the ov7251 " Todor Tomov
2018-03-23 13:40   ` [v2,2/2] " jacopo mondi
2018-03-29  7:50     ` Todor Tomov
2018-03-29  8:29       ` Sakari Ailus
2018-03-29 10:09         ` Todor Tomov [this message]
2018-03-29 10:21           ` Sakari Ailus
2018-03-29 11:11       ` jacopo mondi
2018-03-29 11:51   ` [PATCH v2 2/2] " Sakari Ailus
2018-04-17 15:32     ` Todor Tomov
2018-04-17 20:10       ` Sakari Ailus
2018-04-24 12:49         ` Todor Tomov

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=6625da39-9f35-f0ae-e40c-8ae508018aae@linaro.org \
    --to=todor.tomov@linaro.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox