Re: [PATCH v1 1/3] gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk

2021-03-02 Thread Andy Shevchenko
On Tue, Mar 02, 2021 at 05:07:55PM +0100, Bartosz Golaszewski wrote: > On Tue, Mar 2, 2021 at 4:21 PM Andy Shevchenko > wrote: > Do you want me to take these, or will you include them in your PR? I'll send PR. I'm waiting for vger to process the queue (it has some lags). -- With Bes

[PATCH v1 1/1] genirq/irq_sim: Fix typos in kernel doc (fnode -> fwnode)

2021-03-02 Thread Andy Shevchenko
: warning: Function parameter or member 'fwnode' not described in 'devm_irq_domain_create_sim' .../irq_sim.c:240: warning: Excess function parameter 'fnode' description in 'devm_irq_domain_create_sim' Signed-off-by: Andy Shevchenko --- kernel/irq/irq_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH v1 1/4] gpiolib: Unify the checks on fwnode type

2021-03-02 Thread Andy Shevchenko
On Tue, Mar 02, 2021 at 05:34:48PM +0200, Andy Shevchenko wrote: > We have (historically) different approaches how we identify the type > of a given fwnode. Let's standardize them across the library code. This patch has one functional mistake (see below), otherwise I will anyway wait for

[PATCH v1 3/4] gpiolib: Introduce acpi_gpio_dev_init() and call it from core

2021-03-02 Thread Andy Shevchenko
In the ACPI case we may use the firmware node in the similar way as it's done for OF case. We may use that fwnode for other purposes in the future. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib-acpi.c | 7 +++ drivers/gpio/gpiolib-acpi.h | 4 drivers/gpio/gpiolib.c | 1

[PATCH v1 2/4] gpiolib: Move of_node operations to gpiolib-of and correct fwnode use

2021-03-02 Thread Andy Shevchenko
per. Amend gpiolib.c and gpiolib-of.c code in order to group OF operations. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib-of.c | 6 -- drivers/gpio/gpiolib.c| 9 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/g

[PATCH v1 4/4] gpiolib: Reuse device's fwnode to create IRQ domain

2021-03-02 Thread Andy Shevchenko
: unknown-1 ==> \_SB.PCI0.GIP0.GPO unknown-2 ==> \_SB.NIO3 Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c

[PATCH v1 1/4] gpiolib: Unify the checks on fwnode type

2021-03-02 Thread Andy Shevchenko
We have (historically) different approaches how we identify the type of a given fwnode. Let's standardize them across the library code. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git

Re: [PATCH 3/3] [v4] lib/vsprintf: no_hash_pointers prints all addresses as unhashed

2021-03-02 Thread Andy Shevchenko
; **\n"); > > + pr_warn("** the kernel, report this immediately to your system > > **\n"); > > + pr_warn("** administrator! > > **\n"); > > + pr_warn("** > > **\n"); > > + pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > **\n"); > > + > > pr_warn("**\n"); > > Fortunately gcc is already smart enough to deduplicate identical strings, > but only in the same source file. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] gpio: Support interrupts in gpio-mlxbf2.c

2021-03-02 Thread Andy Shevchenko
future version of this, because some pieces of the code (AFAICS from this message) looks suboptimal or dup or... > On Tue, Feb 23, 2021 at 11:51 PM Asmaa Mnebhi wrote: That said, will wait for v2 of this. -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/3] gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk

2021-03-02 Thread Andy Shevchenko
On Tue, Mar 02, 2021 at 05:14:30PM +0200, Mika Westerberg wrote: > On Tue, Mar 02, 2021 at 05:09:24PM +0200, Andy Shevchenko wrote: > > On Tue, Mar 02, 2021 at 03:48:43PM +0100, Linus Walleij wrote: > > > On Thu, Feb 25, 2021 at 5:33 PM Andy Shevchenko > > > wrote: >

Re: [PATCH v2 1/3] parport: Introduce module_parport_driver() helper macro

2021-03-02 Thread Andy Shevchenko
On Tue, Mar 02, 2021 at 02:51:45PM +, Sudip Mukherjee wrote: > On Mon, Mar 1, 2021 at 12:12 PM Andy Shevchenko > wrote: > > > > On Sun, Feb 28, 2021 at 11:27:10PM +, Sudip Mukherjee wrote: > > > On Fri, Feb 26, 2021 at 07:03:09PM +0200, Andy Shevchenko wrote: &

Re: [PATCH v1 1/3] gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk

2021-03-02 Thread Andy Shevchenko
On Tue, Mar 02, 2021 at 03:48:43PM +0100, Linus Walleij wrote: > On Thu, Feb 25, 2021 at 5:33 PM Andy Shevchenko > wrote: > > > On some systems the ACPI tables has wrong pin number and instead of > > having a relative one it provides an absolute one in the global

[PATCH v1 2/5] mfd: intel_quark_i2c_gpio: Unregister resources in reversed order

2021-03-02 Thread Andy Shevchenko
In ->remove() unregister resources in reversed order, i.e. MFD devices first followed by I²C clock. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/

[PATCH v1 4/5] mfd: intel_quark_i2c_gpio: Replace I²C speeds with descriptive definitions

2021-03-02 Thread Andy Shevchenko
I²C header provides a descriptive definitions for standard bus speeds. Use them instead of plain numbers. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b

[PATCH v1 5/5] mfd: intel_quark_i2c_gpio: Reuse BAR definitions for MFD cell indexing

2021-03-02 Thread Andy Shevchenko
It's convenient and less error prone to use definitions to address different cells in an array. For this purpose we may reuse existing BAR definitions. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions

[PATCH v1 1/5] mfd: intel_quark_i2c_gpio: revert "Constify static struct resources"

2021-03-02 Thread Andy Shevchenko
Cc: Rikard Falkeborn Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c index 55a9e017edee..124c0ee84169 100644 --- a/d

[PATCH v1 3/5] mfd: intel_quark_i2c_gpio: Remove unused struct device member

2021-03-02 Thread Andy Shevchenko
The device pointer in the custom structure is not used anywhere, remove it for good. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel_quark_i2c_gpio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c index

[PATCH v1 1/1] ACPI: bus: Constify is_acpi_node() and friends (part 2)

2021-03-02 Thread Andy Shevchenko
The commit 8b9d6802583a ("ACPI: Constify acpi_bus helper functions, switch to macros") only changed functions for CONFIG_ACPI=y case. This part adjusts the rest. Fixes: 8b9d6802583a ("ACPI: Constify acpi_bus helper functions, switch to macros") Cc: Sakari Ailus Signed-off

Re: Re: Re: [PATCH] sata_dwc_460ex: Fix missing check in sata_dwc_isr

2021-03-02 Thread Andy Shevchenko
in sata_dwc_isr(), which is odd. Thanks for this information, it makes sense to me. Perhaps you need to put this into the commit message to justify the need of the change. > There is no issue currently does not > mean it will never happen in the future. So I suggest the maintainer of > function > sata_dwc_isr() to fix this issue. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5 1/2] pinctrl: use to octal permissions for debugfs files

2021-03-02 Thread Andy Shevchenko
ot;checkpatch: look for symbolic permissions and suggest octal instead"). > > > > Note: S_IFREG flag is added to the mode by __debugfs_create_file() > > in fs/debugfs/inode.c > > > > Suggested-by: Andy Shevchenko > > Signed-off-by: Drew Fustini > > Patch

[PATCH v1 1/2] lib/cmdline: Export next_arg() for being used in modules

2021-03-01 Thread Andy Shevchenko
At least one module will benefit from using next_arg() helper. Let's export it for that module and others if they consider it helpful. Signed-off-by: Andy Shevchenko --- lib/cmdline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cmdline.c b/lib/cmdline.c index 5d474c626e24

[PATCH v1 2/2] gpio: aggregator: Replace custom get_arg() with a generic next_arg()

2021-03-01 Thread Andy Shevchenko
cmdline library provides next_arg() helper to traverse over parameters and their values given in command line. Replace custom approach in the driver by it. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-aggregator.c | 39 +- 1 file changed, 5 insertions

Re: [PATCH v2 0/2] gpio: regression fixes

2021-03-01 Thread Andy Shevchenko
atches applied, thanks! Ooops, you are fast! Anyway, I have tested with gpio-aggregator (w/o this series it sparkles with all possible bugs). Tested-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 4/4] HID: i2c-hid: acpi: Drop redundant ACPI_PTR()

2021-03-01 Thread Andy Shevchenko
On Mon, Mar 01, 2021 at 04:34:41PM +0100, Jiri Kosina wrote: > On Mon, 1 Mar 2021, Benjamin Tissoires wrote: > > On Fri, Feb 26, 2021 at 8:34 PM Andy Shevchenko > > wrote: > > > > > > The driver depends on ACPI, ACPI_PTR() resolution is always the same. >

Re: [PATCH 2/2] software node: Fix device_add_software_node()

2021-03-01 Thread Andy Shevchenko
se a failure with > nodes that are already registered. > > Fixing that by incrementing the reference count of the nodes > that have already been registered, and only registering the > new nodes. Also, clarifying the behaviour in the function > documentation. Reviewed-by: An

Re: [PATCH 1/2] software node: Fix node registration

2021-03-01 Thread Andy Shevchenko
On Mon, Mar 01, 2021 at 05:30:11PM +0300, Heikki Krogerus wrote: > Software node can not be registered before its parent. Reviewed-by: Andy Shevchenko Tested-by: Andy Shevchenko (On Intel Galileo Gen 2 with some custom patches to convert gpio-dwapb et al. to use swnodes. Those patc

[PATCH v1 2/4] mfd: intel-lpss: Constify device property structures

2021-03-01 Thread Andy Shevchenko
There is no point to have non-constant device properties in this driver. Thus, constify them for good. Signed-off-by: Andy Shevchenko --- drivers/mfd/intel-lpss-acpi.c | 8 drivers/mfd/intel-lpss-pci.c | 10 +- drivers/mfd/intel-lpss.h | 2 +- 3 files changed, 10

[PATCH v1 1/4] mfd: core: Add support for software nodes

2021-03-01 Thread Andy Shevchenko
From: Heikki Krogerus The old device property API is going to be removed and replaced with the newer software node API. This prepares MFD subsystem for the transition. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko --- drivers/mfd/mfd-core.c | 9 + include/linux/mfd

[PATCH v1 3/4] mfd: intel-lpss: Switch to use the software nodes

2021-03-01 Thread Andy Shevchenko
From: Heikki Krogerus Software node was always created for the device if it was supplied with additional device properties, so those nodes might as well be constant. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko --- drivers/mfd/intel-lpss-acpi.c | 24

[PATCH v1 4/4] mfd: core: Remove support for dangling device properties

2021-03-01 Thread Andy Shevchenko
From: Heikki Krogerus >From now on only accepting complete software nodes. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko --- drivers/mfd/mfd-core.c | 6 -- include/linux/mfd/core.h | 4 2 files changed, 10 deletions(-) diff --git a/drivers/mfd/mfd-core.c b/driv

Re: [PATCH] gpiolib: acpi: Add missing IRQF_ONESHOT

2021-03-01 Thread Andy Shevchenko
On Mon, Mar 01, 2021 at 02:57:53PM +0100, Bartosz Golaszewski wrote: > On Thu, Feb 25, 2021 at 4:07 PM Andy Shevchenko > wrote: > > On Tue, Feb 23, 2021 at 01:51:53PM +0200, Andy Shevchenko wrote: > > > On Tue, Feb 23, 2021 at 04:35:58PM +0800, Yang Li wrote: > &

Re: [PATCH 3/5] HID: core: Export some report item parsing functions.

2021-03-01 Thread Andy Shevchenko
tem() or so. -- With Best Regards, Andy Shevchenko

Re: [PATCH 4/5] HID: apple-ibridge: Add Apple iBridge HID driver for T1 chip.

2021-03-01 Thread Andy Shevchenko
on 2016 and 2017 MacBookPro's, also known as the iBridge. The > drivers > + for the Touch Bar (apple-touchbar) and light sensor (hid-sensor-hub > + and hid-sensor-als) need to be enabled separately. > + > + To compile this driver as a module, choose M here: the > + module will be called apple-ibridge. -- With Best Regards, Andy Shevchenko

Re: Re: [PATCH] sata_dwc_460ex: Fix missing check in sata_dwc_isr

2021-03-01 Thread Andy Shevchenko
follow everything that some (non-ideal) tool reports? I don't think so. For all my experiments with that hardware, I haven't heard about the issue with NULL pointers. Useless checks make code harder to read and CPU to waste cycles. It might be maintainers of this driver consider otherwise, so not my call. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-01 Thread Andy Shevchenko
sgs[outcnt++] = _buf; > + } ... > + > + One blank line is enough. ... > + ret = virtio_i2c_send_reqs(vq, reqs, msgs, num); > + if (ret == 0) > + goto err_unlock_free; > + else Redundant. > + nr = ret; -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 1/3] parport: Introduce module_parport_driver() helper macro

2021-03-01 Thread Andy Shevchenko
On Sun, Feb 28, 2021 at 11:27:10PM +, Sudip Mukherjee wrote: > On Fri, Feb 26, 2021 at 07:03:09PM +0200, Andy Shevchenko wrote: > > On Tue, Feb 16, 2021 at 01:07:39PM +0200, Andy Shevchenko wrote: > > > Introduce module_parport_driver() helper macro to reduce boilerplate >

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-01 Thread Andy Shevchenko
d SMBus support bidirectional transfers as well. I think two buffers is the right thing to do. -- With Best Regards, Andy Shevchenko

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-01 Thread Andy Shevchenko
On Mon, Mar 01, 2021 at 02:09:25PM +0200, Andy Shevchenko wrote: > On Mon, Mar 01, 2021 at 05:24:41PM +0530, Viresh Kumar wrote: > > On 01-03-21, 14:41, Jie Deng wrote: > > > +/** > > > + * struct virtio_i2c_req - the virtio I2C request structure > > > + * @o

Re: [RESEND][PATCH v4 1/2] Added AMS tsl2591 driver implementation

2021-03-01 Thread Andy Shevchenko
enum iio_event_info info, int *val, > > + int *val2) Ditto. ... > > +static int __maybe_unused tsl2591_resume(struct device *dev) > > +{ > > + struct iio_dev *indio_dev = dev_get_drvdata(dev); > > + struct tsl2591_chip *chip = iio_priv(indio_dev); > > + int ret; > > + int power_state; > > + > > + if (chip->events_enabled) > > + power_state = TSL2591_PWR_ON | > > + TSL2591_ENABLE_ALS_INT | > > + TSL2591_ENABLE_ALS; At least the last two can be on one line. > > + else > > + power_state = TSL2591_PWR_ON | TSL2591_ENABLE_ALS; > > + > > + mutex_lock(>als_mutex); > > + ret = tsl2591_set_power_state(chip, power_state); > > + mutex_unlock(>als_mutex); > > + > > + return ret; > > +} ... > > +static const struct dev_pm_ops tsl2591_pm_ops = { > > + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, > > + pm_runtime_force_resume) One line? > > + SET_RUNTIME_PM_OPS(tsl2591_suspend, tsl2591_resume, NULL) > > +}; ... > > +static irqreturn_t tsl2591_event_handler(int irq, void *private) > > +{ > > + /* Clear ALS irq */ > > + ret = i2c_smbus_write_byte(client, TSL2591_CMD_SF_CALS_NPI); > > + if (ret < 0) > > + dev_err(>dev, "Failed to clear als irq\n"); In the IRQ handler? Hmm... It potentially floods the logs. > > + return IRQ_HANDLED; > > +} ... > > +static const struct of_device_id tsl2591_of_match[] = { > > + { .compatible = "amstaos,tsl2591"}, > > + {}, Comma is not needed on the terminator line. > > +}; -- With Best Regards, Andy Shevchenko

Re: [PATCH] sata_dwc_460ex: Fix missing check in sata_dwc_isr

2021-03-01 Thread Andy Shevchenko
reproduce this? -- With Best Regards, Andy Shevchenko

Re: [PATCH 2/2] drivers: misc: add ripple counter driver

2021-02-28 Thread Andy Shevchenko
On Sun, Feb 28, 2021 at 11:29 AM Andy Shevchenko wrote: > > On Sun, Feb 28, 2021 at 11:07 AM Andy Shevchenko > wrote: > > On Friday, February 26, 2021, Rasmus Villemoes > > wrote: > >> > >> The only purpose of this driver is to serve as a consumer of t

Re: [PATCH 2/2] drivers: misc: add ripple counter driver

2021-02-28 Thread Andy Shevchenko
On Sun, Feb 28, 2021 at 11:07 AM Andy Shevchenko wrote: > On Friday, February 26, 2021, Rasmus Villemoes > wrote: >> >> The only purpose of this driver is to serve as a consumer of the input >> clock, to prevent it from being disabled by clk_disable_unused(). >

[PATCH v2 2/4] HID: i2c-hid: acpi: Switch to new style i2c-driver probe function

2021-02-26 Thread Andy Shevchenko
Switch to the new style i2c-driver probe_new probe function. Signed-off-by: Andy Shevchenko --- v2: new patch drivers/hid/i2c-hid/i2c-hid-acpi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c

[PATCH v2 3/4] HID: i2c-hid: acpi: Move GUID out of function and described it

2021-02-26 Thread Andy Shevchenko
Move static GUID variable out of the function and add a comment how it looks like in the human readable representation. While at it, include uuid.h since the guid_t type is defined in it. Signed-off-by: Andy Shevchenko --- v2: rebased on top of patch 1 that used to be separate change drivers

[PATCH v2 1/4] HID: i2c-hid: acpi: Get ACPI companion only once and reuse it

2021-02-26 Thread Andy Shevchenko
Currently the ACPI companion and handle are retrieved and checked a few times in different functions. Instead get ACPI companion only once and reuse it everywhere. Signed-off-by: Andy Shevchenko --- v2: used companion indeed everywhere (i2c_hid_acpi_shutdown_tail() included) drivers/hid/i2c-hid

[PATCH v2 4/4] HID: i2c-hid: acpi: Drop redundant ACPI_PTR()

2021-02-26 Thread Andy Shevchenko
The driver depends on ACPI, ACPI_PTR() resolution is always the same. Otherwise a compiler may produce a warning. That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or none should be used in a driver. Signed-off-by: Andy Shevchenko --- v2: no changes drivers/hid/i2c-hid/i2c-hid

Re: [PATCH v1 1/1] HID: i2c-hid: acpi: Drop redundant ACPI_PTR()

2021-02-26 Thread Andy Shevchenko
On Fri, Feb 26, 2021 at 8:35 PM Andy Shevchenko wrote: > > The driver depends on ACPI, ACPI_PTR() resolution is always the same. > Otherwise a compiler may produce a warning. > > That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or > none should be used in a drive

Re: [PATCH v1 1/1] HID: i2c-hid: acpi: Move GUID out of function and described it

2021-02-26 Thread Andy Shevchenko
On Fri, Feb 26, 2021 at 8:32 PM Andy Shevchenko wrote: > > Move static GUID variable out of the function and add a comment > how it looks like in the human readable representation. > > While at it, include uuid.h since the guid_t type is defined in it. Oh, I see more improvements

Re: [PATCH v1 1/1] HID: i2c-hid: acpi: Get ACPI companion only once and reuse it

2021-02-26 Thread Andy Shevchenko
On Fri, Feb 26, 2021 at 8:44 PM Andy Shevchenko wrote: > > Currently the ACPI companion and handle are retrieved and checked > a few times in different functions. Instead get ACPI companion only > once and reuse it everywhere. > > Signed-off-by: Andy Shevchenko > --- > &g

[PATCH v1 1/1] HID: i2c-hid: acpi: Get ACPI companion only once and reuse it

2021-02-26 Thread Andy Shevchenko
Currently the ACPI companion and handle are retrieved and checked a few times in different functions. Instead get ACPI companion only once and reuse it everywhere. Signed-off-by: Andy Shevchenko --- It depends on previously sent patch that moves GUID out of the function. If needed I can resend

[PATCH v1 1/1] HID: i2c-hid: acpi: Drop redundant ACPI_PTR()

2021-02-26 Thread Andy Shevchenko
The driver depends on ACPI, ACPI_PTR() resolution is always the same. Otherwise a compiler may produce a warning. That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or none should be used in a driver. Signed-off-by: Andy Shevchenko --- drivers/hid/i2c-hid/i2c-hid-acpi.c | 2 +- 1

[PATCH v1 1/1] HID: i2c-hid: acpi: Move GUID out of function and described it

2021-02-26 Thread Andy Shevchenko
Move static GUID variable out of the function and add a comment how it looks like in the human readable representation. While at it, include uuid.h since the guid_t type is defined in it. Signed-off-by: Andy Shevchenko --- drivers/hid/i2c-hid/i2c-hid-acpi.c | 9 ++--- 1 file changed, 6

Re: [PATCH v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line

2021-02-26 Thread Andy Shevchenko
On Tue, Feb 16, 2021 at 01:31:48PM +0200, Andy Shevchenko wrote: > When requesting optional GPIO echo line, bail out on error, > so user will know that something wrong with the existing property. Guys, any comments on this series? > Signed-off-by: Andy Shevchenko > --- > driv

Re: [PATCH v2 1/3] parport: Introduce module_parport_driver() helper macro

2021-02-26 Thread Andy Shevchenko
On Tue, Feb 16, 2021 at 01:07:39PM +0200, Andy Shevchenko wrote: > Introduce module_parport_driver() helper macro to reduce boilerplate > in the existing and new code. Sudip, any comments on this? > Signed-off-by: Andy Shevchenko > --- > v2: fixed typo in the macro > inclu

Re: [PATCH v5 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-26 Thread Andy Shevchenko
place some code in pcim_release(), > they are equivalent, and no functional change. It is more explicit > that pcim_alloc_irq_vectors() is a device-managed function. Thanks! Reviewed-by: Andy Shevchenko > Suggested-by: Andy Shevchenko > Signed-off-by: Dejin Zheng > --- > v4

Re: [PATCH] staging: atomisp: reduce kernel stack usage

2021-02-26 Thread Andy Shevchenko
v4l2_pix_format structure > directly. This reduces the stack usage to 612 bytes, and it could > be reduced further by only storing the three members that are used. Good to me! Reviewed-by: Andy Shevchenko > Signed-off-by: Arnd Bergmann > --- > .../staging/media/atomisp/pci/atom

[PATCH v1 3/3] gpio: pca953x: Set IRQ type when handle Intel Galileo Gen 2

2021-02-25 Thread Andy Shevchenko
OPROBE set unexpected IRQ trap at vector 20 Fixes: ba8c90c61847 ("gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2") Depends-on: 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") Signed-off-by: Andy Shev

[PATCH v1 1/3] gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk

2021-02-25 Thread Andy Shevchenko
nders on Galileo Gen 2") Depends-on: 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib-acpi.c | 7 ++- include/linux/gpio/consumer.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-)

[PATCH v1 0/3] gpio: pca953x: Better quirk for Intel Galileo Gen 2

2021-02-25 Thread Andy Shevchenko
and ACPI subsystems I guess). This is material for v5.12-rcX. [1]: https://lore.kernel.org/linux-gpio/20200520211916.25727-1-andriy.shevche...@linux.intel.com/ Andy Shevchenko (3): gpiolib: acpi: Add ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER quirk gpiolib: acpi: Allow to find GpioInt() resource by name

[PATCH v1 2/3] gpiolib: acpi: Allow to find GpioInt() resource by name and index

2021-02-25 Thread Andy Shevchenko
;gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2") Depends-on: 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib-acpi.c | 12 include/linux/acpi.h| 10

Re: [PATCH v1 1/1] i2c: cht-wc: Use fwnode for the controller and IRQ domain

2021-02-25 Thread Andy Shevchenko
On Thu, Feb 25, 2021 at 5:11 AM Hans de Goede wrote: > On 2/24/21 1:51 PM, Andy Shevchenko wrote: > > On Tue, Feb 23, 2021 at 08:25:35PM +0100, Hans de Goede wrote: > >> On 2/23/21 6:22 PM, Andy Shevchenko wrote: > >>> It's better to describe the I²C contro

Re: [PATCH] gpiolib: acpi: Add missing IRQF_ONESHOT

2021-02-25 Thread Andy Shevchenko
On Tue, Feb 23, 2021 at 01:51:53PM +0200, Andy Shevchenko wrote: > On Tue, Feb 23, 2021 at 04:35:58PM +0800, Yang Li wrote: > > fixed the following coccicheck: > > ./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no > > primary handler requested without IRQF_

Re: [PATCH v2] i2c: designware: Get right data length

2021-02-25 Thread Andy Shevchenko
he > data to be transmitted or received on the I2C bus, so we should use the > lower 8 bits to get the real data length. Reviewed-by: Andy Shevchenko > Signed-off-by: Liguang Zhang > --- > drivers/i2c/busses/i2c-designware-core.h | 2 ++ > drivers/i2c/busses/i2c-designware-master.c |

Re: [PATCH v2 1/9] units: Add the HZ macros

2021-02-25 Thread Andy Shevchenko
On Wed, Feb 24, 2021 at 03:42:11PM +0100, Daniel Lezcano wrote: > The macros for the unit conversion for frequency are duplicated in > different places. > > Provide these macros in the 'units' header, so they can be reused. For the all that have not been tagged: Reviewed-by: And

Re: [PATCH] i2c: designware: Get right data length

2021-02-25 Thread Andy Shevchenko
AT) <= I2C_SMBUS_BLOCK_MAX && tmp > 0) { ...here? > len = i2c_dw_recv_len(dev, tmp); > } > *buf++ = tmp; > -- > 2.19.1.6.gb485710b > -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/1] i2c: cht-wc: Use fwnode for the controller and IRQ domain

2021-02-24 Thread Andy Shevchenko
On Tue, Feb 23, 2021 at 08:25:35PM +0100, Hans de Goede wrote: > On 2/23/21 6:22 PM, Andy Shevchenko wrote: > > It's better to describe the I²C controller and associated IRQ domain with > > fwnode, so they will find their place in the hierarchy in sysfs and also > >

Re: [PATCH v3 5/6] platform/x86: Add intel_skl_int3472 driver

2021-02-24 Thread Andy Shevchenko
t_*() and they do increase the reference counter one way or the other. -- With Best Regards, Andy Shevchenko

Re: [PATCH] x86: platform: iosf_mbi: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Andy Shevchenko
On Wed, Feb 24, 2021 at 10:16 AM Yang Li wrote: > > Fix the following coccicheck warning: > ./arch/x86/platform/intel/iosf_mbi.c:482:0-23: WARNING: iosf_mcr_fops > should be defined with DEFINE_DEBUGFS_ATTRIBUTE Acked-by: Andy Shevchenko > Reported-by: Abaci Robot > Sign

[PATCH v1 1/1] i2c: cht-wc: Use fwnode for the controller and IRQ domain

2021-02-23 Thread Andy Shevchenko
It's better to describe the I²C controller and associated IRQ domain with fwnode, so they will find their place in the hierarchy in sysfs and also make easier to debug. Signed-off-by: Andy Shevchenko --- Hans, unfortunately I have no device at hand with INT34D3. This is only compile tested

Re: [PATCH v3 5/6] platform/x86: Add intel_skl_int3472 driver

2021-02-23 Thread Andy Shevchenko
On Mon, Feb 22, 2021 at 10:35:44PM +, Daniel Scally wrote: > On 22/02/2021 14:58, Andy Shevchenko wrote: > > On Mon, Feb 22, 2021 at 3:12 PM Daniel Scally wrote: ... > >> + if (obj->buffer.length > sizeof(*cldb)) { > >> + dev_err(>

Re: [PATCH] gpiolib: acpi: Add missing IRQF_ONESHOT

2021-02-23 Thread Andy Shevchenko
always request > with IRQF_ONESHOT Acked-by: Andy Shevchenko > Reported-by: Abaci Robot > Signed-off-by: Yang Li > --- > drivers/gpio/gpiolib-acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib

Re: [PATCH v3 5/6] platform/x86: Add intel_skl_int3472 driver

2021-02-22 Thread Andy Shevchenko
tional, you won't need this additional check. > + clk_unregister(int3472->clock.clk); > + > + if (int3472->clock.cl) > + clkdev_drop(int3472->clock.cl); > + > + gpiod_put(int3472->regulator.gpio); > + gpiod_put(int3472->clock.ena_gpio); > + gpiod_put(int3472->clock.led_gpio); > + > + acpi_dev_put(int3472->sensor); > + > + kfree(int3472->sensor_name); > + kfree(int3472); > + > + return 0; > +} ... > + ret = skl_int3472_fill_cldb(adev, ); > + if (!ret && cldb.control_logic_type != 2) { > + dev_err(>dev, "Unsupported control logic type %u\n", > + cldb.control_logic_type); > + return -EINVAL; > + } > + > + if (ret) > + cldb_present = false; if (ret) ... else if (...) { ... return ...; } -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 0/6] Introduce intel_skl_int3472 module

2021-02-22 Thread Andy Shevchenko
drivers/platform/x86/intel-int3472/intel_skl_int3472_common.c > create mode 100644 > drivers/platform/x86/intel-int3472/intel_skl_int3472_common.h > create mode 100644 > drivers/platform/x86/intel-int3472/intel_skl_int3472_discrete.c > create mode 100644 > drivers/platform/x86/intel-int3472/intel_skl_int3472_tps68470.c > > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 6/6] mfd: tps68470: Remove tps68470 MFD driver

2021-02-22 Thread Andy Shevchenko
On Mon, Feb 22, 2021 at 3:12 PM Daniel Scally wrote: > > This driver only covered one scenario in which ACPI devices with _HID > INT3472 are found, and its functionality has been taken over by the > intel-skl-int3472 module, so remove it. As long as patch 5 accepted Acked-by: And

Re: [PATCH v3 4/6] gpiolib: acpi: Export acpi_get_gpiod()

2021-02-22 Thread Andy Shevchenko
fect Which one? "the acpi_...() function" > for that purpose. > > As it's currently only used internally within the GPIO layer, provide and > export a wrapper function that additionally holds a reference to the GPIO > device. Reviewed-by: Andy Shevchenko after address

Re: [PATCH v3 2/6] ACPI: scan: Add function to fetch dependent of acpi device

2021-02-22 Thread Andy Shevchenko
ot; > the dependee, so add a callback and a wrapper to walk over the > acpi_dep_list and return the dependent ACPI device. > Reviewed-by: Andy Shevchenko Nit-picks below as usual :-) > Signed-off-by: Daniel Scally > --- > Changes in v3: > - Switched from

Re: [PATCH v3 1/6] ACPI: scan: Extend acpi_walk_dep_device_list()

2021-02-22 Thread Andy Shevchenko
can be applied to all the dependencies in acpi_dep_list. > Replace all existing calls to the function with calls to a wrapper, passing > a callback that applies the same dependency reduction. The code looks okay to me, if it was the initial idea, feel free to add Reviewed-by: Andy Shevchenko

Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

2021-02-19 Thread Andy Shevchenko
On Fri, Feb 19, 2021 at 02:09:03PM +, Sven Schuchmann wrote: > > Von: Andy Shevchenko > > Gesendet: Freitag, 19. Februar 2021 14:56 > > > > > > Can you or Dan submit patch getting the regulator support to work? > > > > > > If > > >

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Andy Shevchenko
unterpart why not just an inline > function like the one below. It's a good suggestion, thanks! Still we need to amend pcim_release() to explicitly show that we call pci_free_irq_vectors(). -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 01/12] gna: add driver module

2021-02-19 Thread Andy Shevchenko
On Fri, Feb 19, 2021 at 3:21 PM Maciej Kwapulinski wrote: > Andy Shevchenko writes: > > On Tue, Feb 16, 2021 at 6:11 PM Maciej Kwapulinski > > wrote: > >> > > >> +err_clear_master: > >> + pci_clear_master(pcidev); > >> +err_re

Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

2021-02-19 Thread Andy Shevchenko
oving), sorry. > > No problem. It seems Andy submitted series for this. Ah, now I understand what you, Sven, meant. I didn't touch regulator code, so it left the same, but making it work probably needs just enabling during ->probe(). -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

2021-02-19 Thread Andy Shevchenko
efault setting from DT > https://www.spinics.net/lists/linux-leds/msg17596.html > * Fix regulator https://www.spinics.net/lists/linux-leds/msg17631.html -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Andy Shevchenko
On Fri, Feb 19, 2021 at 12:19:20PM +0100, Robert Richter wrote: > On 18.02.21 16:01:56, Andy Shevchenko wrote: > > The problem this series solves is an imbalanced API. > > This (added) API is bloated and incomplete. It adds functions without > benefit, the only is to have a

Re: [PATCH v1 6/7] leds: lp50xx: Add missed bits.h and convert to BIT()

2021-02-19 Thread Andy Shevchenko
On Fri, Feb 19, 2021 at 12:27:55PM +0100, Pavel Machek wrote: > Hi! > > > Add missed bits.h and convert to BIT() in lp50xx_set_banks(). > > > > Signed-off-by: Andy Shevchenko > > Thanks, Thanks! > I applied whole series except this one... > > <

Re: [PATCH 08/14] lib/Kconfig: introduce FAST_PATH option

2021-02-19 Thread Andy Shevchenko
On Thu, Feb 18, 2021 at 11:24:19AM -0800, Yury Norov wrote: > On Thu, Feb 18, 2021 at 05:15:43PM +0200, Andy Shevchenko wrote: > > On Wed, Feb 17, 2021 at 08:05:06PM -0800, Yury Norov wrote: > > > This series introduces fast paths for find_bit() routines. It is > > > ben

Re: [PATCH v4 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-18 Thread Andy Shevchenko
eing resources will take automatically when device is gone. Acked-by: Andy Shevchenko One side note below. > Signed-off-by: Dejin Zheng > --- > v3 -> v4: > - add some commit comments. > v2 -> v3: > - simplify the error handling path. > v1 -> v2: >

Re: [PATCH 14/14] MAINTAINERS: Add entry for the bitmap API

2021-02-18 Thread Andy Shevchenko
ing to maintain it. Perhaps reviewers as well, like Rasmus, if he is okay with that, of course? Otherwise, why not? Acked-by: Andy Shevchenko > Signed-off-by: Yury Norov > --- > MAINTAINERS | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/MAINTAINERS b

Re: [PATCH 11/14] lib: add fast path for find_next_*_bit()

2021-02-18 Thread Andy Shevchenko
t; + if (unlikely(offset >= size)) > + return size; > + val = *addr & GENMASK(size - 1, offset); Yeah, GENMASK() basically for constant values or cases like (x,0). I think here is something what has been done in BITMAP_FIRST/LAST_WORD_MASK will give better results. > + return val ? __ffs(val) : size; > + } -- With Best Regards, Andy Shevchenko

Re: [PATCH 08/14] lib/Kconfig: introduce FAST_PATH option

2021-02-18 Thread Andy Shevchenko
uot;Enable fast path code generation" > + default y > + help > + This option enables fast path optimization with the cost of increasing > + the text section. -- With Best Regards, Andy Shevchenko

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-02-18 Thread Andy Shevchenko
ntk.h module.h types.h The rest seems fine because they are guaranteed to be included by acpi.h (IIUC about fwnode API and acpi_mdio includes MDIO PHY APIs). -- With Best Regards, Andy Shevchenko

Re: [net-next PATCH v6 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2021-02-18 Thread Andy Shevchenko
handle_put(dpmac_node); > + if (is_of_node(dpmac_node)) > + fwnode_handle_put(dpmac_node); Also not sure that you need a check in the above code excerpts. -- With Best Regards, Andy Shevchenko

Re: [net-next PATCH v6 07/15] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2021-02-18 Thread Andy Shevchenko
amper probed via the device tree will still have > +* precedence. > +*/ > + if (mii_ts) > + phy->mii_ts = mii_ts; I'm wondering if the belo form is better to read phy->mii_ts = mii_ts ?: phy->mii_ts; -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-18 Thread Andy Shevchenko
that if we want to use PCI IRQ allocation API the caller must know what's going on. Hiding this behind the scenes is not good. And this series unhides that. Also, you may go and clean up all pci_free_irq_vectors() when pcim_enable_device() is called, but I guess you will get painful process and rejection in a pile of cases. -- With Best Regards, Andy Shevchenko

Re: [PATCH v2] gpio: pca953x: add support for open drain pins on PCAL6524

2021-02-17 Thread Andy Shevchenko
On Wed, Feb 17, 2021 at 3:11 PM Bedel, Alban wrote: > On Tue, 2021-02-16 at 19:50 +0200, Andy Shevchenko wrote: > > On Tue, Feb 16, 2021 at 6:37 PM Bedel, Alban > > wrote: > > > On Mon, 2021-02-15 at 14:53 +0200, Andy Shevchenko wrote: > > > > On Thu,

Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-17 Thread Andy Shevchenko
maybe somewhere under printk) and export to everybody to use. -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-17 Thread Andy Shevchenko
e. Perhaps as a compromise you may add this short sentence to your commit messages, like "the freeing resources will take automatically when device is gone". -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 2/4] Documentation: devres: Add pcim_alloc_irq_vectors()

2021-02-17 Thread Andy Shevchenko
ry about this. And I really can't explain its operation > mechanism to you in a sentence or two. If you are really interested, you > can read the relevant code. I tend on agree on the above. It would be enough to spell it clearly that it's part of devres API (Managed Device Resource) and we are fine. -- With Best Regards, Andy Shevchenko

Re: [RESEND PATCH v2 0/6] lib/find_bit: fast path for small bitmaps

2021-02-17 Thread Andy Shevchenko
On Tue, Feb 16, 2021 at 10:00:42AM -0800, Yury Norov wrote: > On Tue, Feb 16, 2021 at 11:14:23AM +0200, Andy Shevchenko wrote: > > On Mon, Feb 15, 2021 at 01:30:44PM -0800, Yury Norov wrote: > > > [add David Laight ] > > > > > > On Sat, Jan 30, 2021 a

Re: [PATCH v6 3/3] docs/pinctrl: document debugfs files

2021-02-17 Thread Andy Shevchenko
On Wed, Feb 17, 2021 at 12:45 AM Drew Fustini wrote: > > Document debugfs directories and files created for pinctrl subsystem. Thanks for doing this! I won't bikeshed now because it's about debugfs anyway, so Reviewed-by: Andy Shevchenko > Suggested-by: Andy Shevchenko > Signed-

Re: linux-next: manual merge of the tip tree with the pm tree

2021-02-17 Thread Andy Shevchenko
y particularly complex conflicts. Yes, the file removal is the right thing to do. Thanks! -- With Best Regards, Andy Shevchenko

<    4   5   6   7   8   9   10   11   12   13   >