From: Joe Perches <joe@perches.com>
To: "Krzysztof Hałasa" <khalasa@piap.pl>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Jacopo Mondi <jacopo@jmondi.org>
Subject: Re: [PATCH v6 2/2] Driver for ON Semi AR0521 camera sensor
Date: Thu, 23 Dec 2021 09:49:58 -0800 [thread overview]
Message-ID: <cee1bbe6c8dda1c79ba19f7bbf68fc1d74558cae.camel@perches.com> (raw)
In-Reply-To: <m35yrfhkaf.fsf@t19.piap.pl>
On Thu, 2021-12-23 at 08:06 +0100, Krzysztof Hałasa wrote:
> The driver has been extensively tested in an i.MX6-based system.
> AR0521 is a 5.7 mm x 4.3 mm, 5 MPix RGGB MIPI/HiSPi BSI CMOS sensor
> from On Semiconductor.
trivial notes:
> diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c
[]
> +/* External clock (extclk) frequencies */
> +#define AR0521_EXTCLK_MIN (10 * 1000 * 1000)
Generally, adding a prefix like AR0521_ to defines that are
locally defined in a single file unnecessarily increases
identifier length.
It makes using short line lengths difficult.
e.g. Using this identifier anywhere
> +#define AR0521_REG_HISPI_CONTROL_STATUS_FRAMER_TEST_MODE_ENABLE 0x80
Many of the 80 column line lengths and line wrapping used in this
file are not really nice to read. I believe you don't have to be
strict about 80 column lines.
> +#define be cpu_to_be16
It's a pity there's no way to declare an array with all members
having a specific endianness. Making sure all elements in these
arrays are declared with be() is tedious.
> +#define AR0521_NUM_SUPPLIES ARRAY_SIZE(ar0521_supply_names)
It's almost always better to use ARRAY_SIZE directly and not
use a #define for the array size.
> +static int ar0521_set_gains(struct ar0521_dev *sensor)
> +{
[]
> + dev_dbg(&sensor->i2c_client->dev, "%s()\n", __func__);
ftrace works and perhaps all the similar debug logging uses aren't
really necessary.
next prev parent reply other threads:[~2021-12-23 17:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 6:54 [PATCH v6 0/2] On Semi AR0521 sensor driver Krzysztof Hałasa
2021-12-23 6:57 ` [PATCH v6 1/2] dt-binding: media: document ON Semi AR0521 sensor bindings Krzysztof Hałasa
2021-12-23 7:06 ` [PATCH v6 2/2] Driver for ON Semi AR0521 camera sensor Krzysztof Hałasa
2021-12-23 17:49 ` Joe Perches [this message]
2021-12-23 18:48 ` Jacopo Mondi
2021-12-23 19:19 ` Joe Perches
2021-12-23 20:13 ` Joe Perches
2021-12-23 20:27 ` Joe Perches
2021-12-24 9:22 ` Jacopo Mondi
2021-12-24 12:30 ` Joe Perches
2021-12-29 15:05 ` Krzysztof Hałasa
2021-12-29 14:11 ` Krzysztof Hałasa
2021-12-31 23:14 ` kernel test robot
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=cee1bbe6c8dda1c79ba19f7bbf68fc1d74558cae.camel@perches.com \
--to=joe@perches.com \
--cc=devicetree@vger.kernel.org \
--cc=jacopo@jmondi.org \
--cc=khalasa@piap.pl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
/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
all inboxes | Powered by JetHome®