From: Lee Jones <lee.jones@linaro.org>
To: Alistair Francis <alistair23@gmail.com>
Cc: Alistair Francis <alistair@alistair23.me>,
Rob Herring <robh+dt@kernel.org>,
lgirdwood@gmail.com, Mark Brown <broonie@kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
Sascha Hauer <kernel@pengutronix.de>,
devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] mfd: Initial commit of sy7636a
Date: Tue, 23 Mar 2021 09:35:41 +0000 [thread overview]
Message-ID: <20210323093541.GQ2916463@dell> (raw)
In-Reply-To: <CAKmqyKOJ251sRUaxUKJ_U=puYRkypPEHAVZOnAKbQtP2skMJBA@mail.gmail.com>
On Sat, 20 Mar 2021, Alistair Francis wrote:
> On Thu, Feb 4, 2021 at 5:31 AM Lee Jones <lee.jones@linaro.org> wrote:
> >
> > On Sat, 16 Jan 2021, Alistair Francis wrote:
> >
> > > Initial support for the Silergy SY7636A Power Management chip
> > > driver.
> >
> > Please remove "driver", as this is not support for the driver, it *is*
> > the driver which supports the chip.
>
> Sorry for the long delay here.
>
> I have addressed your comments.
[...]
> > > diff --git a/drivers/mfd/sy7636a.c b/drivers/mfd/sy7636a.c
> > > new file mode 100644
> > > index 000000000000..39aac965d854
> > > --- /dev/null
> > > +++ b/drivers/mfd/sy7636a.c
> > > @@ -0,0 +1,252 @@
> > > +// SPDX-License-Identifier: GPL-2.0+
> > > +/*
> > > + * MFD driver for SY7636A chip
> >
> > "Parent driver".
> >
> > > + * Copyright (C) 2019 reMarkable AS - http://www.remarkable.com/
> >
> > This is quite out of date. Please update.
>
> I don't own this copyright, so I would rather not change it.
I'm not comfortable taking a new driver with an old Copyright.
Maybe ask reMarkable if it's okay to bump it.
> > > + * Author: Lars Ivar Miljeteig <lars.ivar.miljeteig@remarkable.com>
Or ping this guy.
[...]
> > > +int set_vcom_voltage_mv(struct regmap *regmap, unsigned int vcom)
> > > +{
> > > + int ret;
> > > + unsigned int val;
> > > +
> > > + if (vcom < 0 || vcom > 5000)
> >
> > Please define min/max values.
> >
> > > + return -EINVAL;
> > > +
> > > + val = (unsigned int)(vcom / 10) & 0x1ff;
> >
> > As above.
>
> I have used defines for all of these.
>
> >
> > > + ret = regmap_write(regmap, SY7636A_REG_VCOM_ADJUST_CTRL_L, val);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + ret = regmap_write(regmap, SY7636A_REG_VCOM_ADJUST_CTRL_H, val >> 8);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + return 0;
> > > +}
> >
> > Who calls these?
>
> They sysfs store and show functions.
They should be in a power/regulator driver really.
[...]
> > > + if (val >= ARRAY_SIZE(states)) {
> > > + dev_err(sy7636a->dev, "Unexpected value read from device: %u\n", val);
> > > + return -EINVAL;
> > > + }
> > > +
> > > + return snprintf(buf, PAGE_SIZE, "%s\n", states[val]);
> > > +}
> > > +static DEVICE_ATTR(state, 0444, state_show, NULL);
> >
> > You need to document new sysfs entries.
>
> I'm not sure how to document this. Do you mind pointing out an example
> I can use?
See the final paragraph in:
Documentation/filesystems/sysfs.rst
[...]
> > > +static struct attribute *sy7636a_sysfs_attrs[] = {
> > > + &dev_attr_state.attr,
> > > + &dev_attr_power_good.attr,
> > > + &dev_attr_vcom.attr,
> > > + NULL,
> > > +};
> >
> > These all look like power options? Do they really belong here?
>
> From what I can tell I think they do. Let me know if you don't think so.
As above, I think they should be in power or regulator.
[...]
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2021-03-23 9:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 4:25 [PATCH 1/6] devicetree/bindings: Initial commit of silergy,sy7636a.yaml Alistair Francis
2021-01-17 4:25 ` [PATCH 2/6] mfd: Initial commit of sy7636a Alistair Francis
2021-02-04 10:31 ` Lee Jones
2021-03-21 2:18 ` Alistair Francis
2021-03-23 9:35 ` Lee Jones [this message]
2021-03-25 13:49 ` Alistair Francis
2021-01-17 4:25 ` [PATCH 3/6] devicetree/bindings: Initial commit of silergy,sy7636a-regulator.yaml Alistair Francis
2021-01-18 12:35 ` Mark Brown
2021-01-18 12:42 ` Mark Brown
2021-01-22 5:05 ` Alistair Francis
2021-01-18 15:47 ` Rob Herring
2021-01-17 4:25 ` [PATCH 4/6] regulator: Initial commit of sy7636a Alistair Francis
2021-01-18 12:31 ` Mark Brown
2021-01-22 6:24 ` Alistair Francis
2021-01-22 13:37 ` Mark Brown
2021-01-23 8:34 ` Alistair Francis
2021-01-17 4:25 ` [PATCH 5/6] arch/arm: reMarkable2: Enable silergy,sy7636a Alistair Francis
2021-01-17 4:25 ` [PATCH 6/6] arch/arm: reMarkable2: Enable lcdif Alistair Francis
2021-01-18 15:47 ` [PATCH 1/6] devicetree/bindings: Initial commit of silergy,sy7636a.yaml Rob Herring
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=20210323093541.GQ2916463@dell \
--to=lee.jones@linaro.org \
--cc=alistair23@gmail.com \
--cc=alistair@alistair23.me \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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.