From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Lee Jones" <lee@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"Haibo Chen" <haibo.chen@nxp.com>
Subject: Re: [PATCH v4 2/4] mfd: adp5585: Add Analog Devices ADP5585 core support
Date: Mon, 10 Jun 2024 18:11:58 +0300 [thread overview]
Message-ID: <ZmcXvnVH6g2k8zam@surfacebook.localdomain> (raw)
In-Reply-To: <20240608141633.2562-3-laurent.pinchart@ideasonboard.com>
Sat, Jun 08, 2024 at 05:16:31PM +0300, Laurent Pinchart kirjoitti:
> From: Haibo Chen <haibo.chen@nxp.com>
>
> The ADP5585 is a 10/11 input/output port expander with a built in keypad
> matrix decoder, programmable logic, reset generator, and PWM generator.
> This driver supports the chip by modelling it as an MFD device, with two
> child devices for the GPIO and PWM functions.
>
> The driver is derived from an initial implementation from NXP, available
> in commit 8059835bee19 ("MLK-25917-1 mfd: adp5585: add ADI adp5585 core
> support") in their BSP kernel tree. It has been extensively rewritten.
...
> +#include <linux/array_size.h>
> +#include <linux/device.h>
+ err.h
> +#include <linux/i2c.h>
> +#include <linux/mfd/adp5585.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> +#include <linux/types.h>
...
> +static const struct mfd_cell adp5585_devs[] = {
> + { .name = "adp5585-gpio", },
> + { .name = "adp5585-pwm", },
Inner commas are not needed.
> +};
...
> +#define ADP5585_Rx_PULL_CFG_PU_300K 0
> +#define ADP5585_Rx_PULL_CFG_PD_300K 1
> +#define ADP5585_Rx_PULL_CFG_PU_100K 2
> +#define ADP5585_Rx_PULL_CFG_DISABLE 3
> +#define ADP5585_Rx_PULL_CFG_MASK 3
Still supplying MASK is strange, why not supplying DISABLE?
...
> +#define ADP5585_OSC_EN BIT(7)
> +#define ADP5585_OSC_FREQ_50KHZ (0U << 5)
> +#define ADP5585_OSC_FREQ_100KHZ (1U << 5)
> +#define ADP5585_OSC_FREQ_200KHZ (2U << 5)
> +#define ADP5585_OSC_FREQ_500KHZ (3U << 5)
> +#define ADP5585_OSC_FREQ_MASK (3U << 5)
GENMASK() ? And possible the similar question as per above.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-06-10 15:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 14:16 [PATCH v4 0/4] ADP5585 GPIO expander, PWM and keypad controller support Laurent Pinchart
2024-06-08 14:16 ` [PATCH v4 1/4] dt-bindings: mfd: Add Analog Devices ADP5585 Laurent Pinchart
2024-06-10 6:21 ` Stanislav Jakubek
2024-06-10 15:34 ` Laurent Pinchart
2024-06-08 14:16 ` [PATCH v4 2/4] mfd: adp5585: Add Analog Devices ADP5585 core support Laurent Pinchart
2024-06-10 15:11 ` Andy Shevchenko [this message]
2024-07-17 2:39 ` Frank Li
2024-07-19 7:36 ` Laurent Pinchart
2024-06-08 14:16 ` [PATCH v4 3/4] gpio: adp5585: Add Analog Devices ADP5585 support Laurent Pinchart
2024-06-10 15:15 ` Andy Shevchenko
2024-06-10 15:25 ` Laurent Pinchart
2024-06-10 16:29 ` Andy Shevchenko
2024-07-19 13:55 ` Laurent Pinchart
2024-08-01 23:15 ` Andy Shevchenko
2024-06-08 14:16 ` [PATCH v4 4/4] pwm: " Laurent Pinchart
2024-06-10 15:06 ` Andy Shevchenko
2024-06-10 15:28 ` Laurent Pinchart
2024-06-10 16:31 ` Andy Shevchenko
2024-07-19 14:07 ` Laurent Pinchart
2024-08-01 23:21 ` Andy Shevchenko
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=ZmcXvnVH6g2k8zam@surfacebook.localdomain \
--to=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=haibo.chen@nxp.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=robh@kernel.org \
--cc=ukleinek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox