[PATCH 2/6] net: phy: arrange headers in mdio_device.c alphabetically

2020-06-26 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/mdio_device.c | 2 +- 1

[PATCH 6/6] net: phy: mdio: reset MDIO devices even if probe() is not implemented

2020-06-26 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Similarily to PHY drivers - there's no reason to require probe() to be implemented in order to call mdio_device_reset(). MDIO devices can have resets defined without needing to do anything in probe(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn

[PATCH 1/6] net: phy: arrange headers in mdio_bus.c alphabetically

2020-06-26 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/mdio_bus.c | 32

Re: [PATCH 09/22] gpiolib: cdev: rename priv to gcdev

2020-06-25 Thread Bartosz Golaszewski
On Thu, Jun 25, 2020 at 1:16 AM Kent Gibson wrote: > > On Wed, Jun 24, 2020 at 04:20:49PM +0200, Bartosz Golaszewski wrote: > > śr., 24 cze 2020 o 16:19 Kent Gibson napisał(a): > > > > > > On Wed, Jun 24, 2020 at 04:04:09PM +0200, Bartosz Golaszewski wrote: > &g

Re: [PATCH 08/22] gpiolib: cdev: complete the irq/thread timestamp handshake

2020-06-25 Thread Bartosz Golaszewski
On Wed, Jun 24, 2020 at 4:08 PM Kent Gibson wrote: > > On Wed, Jun 24, 2020 at 04:00:42PM +0200, Bartosz Golaszewski wrote: > > wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > > > > > Reset the timestamp field to 0 after using it in lineevent_irq_thread. &g

Re: [PATCH 06/11] phy: un-inline devm_mdiobus_register()

2020-06-25 Thread Bartosz Golaszewski
On Tue, Jun 23, 2020 at 1:55 AM Florian Fainelli wrote: > > On 6/22/20 3:00 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Functions should only be static inline if they're very short. This > > devres helper is already over 10 lines

Re: [PATCH 09/15] net: phy: delay PHY driver probe until PHY registration

2020-06-24 Thread Bartosz Golaszewski
On Wed, Jun 24, 2020 at 6:06 PM Florian Fainelli wrote: > [snip!] > > > > This has evolved into several new concepts being proposed vs my > > use-case which is relatively simple. The former will probably take > > several months of development, reviews and discussions and it will > > block

Re: [PATCH 05/15] net: phy: reset the PHY even if probe() is not implemented

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 21:14 Florian Fainelli napisał(a): > > On 6/22/20 2:37 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Currently we only call phy_device_reset() if the PHY driver implements > > the probe() callback. This is not mandatory and

Re: [PATCH 13/22] gpio: uapi: define uAPI V2

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Add a new version of the uAPI to address existing 32/64bit alignment > issues, add support for debounce and event sequence numbers, and provide > some future proofing by adding padding reserved for future use. > > The alignment issue relates to

Re: [PATCH 09/22] gpiolib: cdev: rename priv to gcdev

2020-06-24 Thread Bartosz Golaszewski
śr., 24 cze 2020 o 16:19 Kent Gibson napisał(a): > > On Wed, Jun 24, 2020 at 04:04:09PM +0200, Bartosz Golaszewski wrote: > > wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > > > > > Rename priv to gcdev to improve readability. > > > > > > The

Re: [PATCH 12/22] gpio: uapi: define GPIO_MAX_NAME_SIZE for array sizes

2020-06-24 Thread Bartosz Golaszewski
their composite fields. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 10/22] gpiolib: cdev: fix minor race in GET_LINEINFO_WATCH

2020-06-24 Thread Bartosz Golaszewski
threads to race past the > test_bit and then set or clear the watch bit, and neither return EBUSY. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 09/22] gpiolib: cdev: rename priv to gcdev

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Rename priv to gcdev to improve readability. > > The name "priv" indicates that the object is pointed to by > file->private_data, not what the object is actually is. > It is always used to point to a struct gpio_chardev_data so renaming > it to

Re: [PATCH 08/22] gpiolib: cdev: complete the irq/thread timestamp handshake

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Reset the timestamp field to 0 after using it in lineevent_irq_thread. > > The timestamp is set by lineevent_irq_handler and is tested by > lineevent_irq_thread to determine if it is called from a nested theaded > interrupt. >

Re: [PATCH 07/22] gpiolib: cdev: remove pointless decrement of i

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Remove pointless decrement of variable, and associated comment. > > While i is used subsequently, it is re-initialized so this decrement > serves no purpose. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 06/22] gpiolib: cdev: rename numdescs to num_descs

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Rename numdescs to num_descs to be more consistent with the naming of > other counters and improve readability. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 05/22] gpiolib: cdev: rename 'filep' and 'filp' to 'file' to be consistent with other use

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Rename 'filep' and 'filp' to 'file' to be consistent with other use > and improve readability. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 04/22] gpiolib: cdev: refactor gpiohandle_flags_to_desc_flags

2020-06-24 Thread Bartosz Golaszewski
Y > simplification more than makes up for any performance degradation, > especially as this is not a hot path. > > Signed-off-by: Kent Gibson > Agreed and I like the code shrink. Reviewed-by: Bartosz Golaszewski

Re: [PATCH 09/15] net: phy: delay PHY driver probe until PHY registration

2020-06-24 Thread Bartosz Golaszewski
śr., 24 cze 2020 o 11:43 Mark Brown napisał(a): > > On Tue, Jun 23, 2020 at 12:49:15PM -0700, Florian Fainelli wrote: > > On 6/22/20 6:51 AM, Mark Brown wrote: > > > > If the bus includes power management for the devices on the bus the > > > controller is generally responsible for that rather

Re: [PATCH 02/22] gpiolib: cdev: sort includes

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:01 Kent Gibson napisał(a): > > Sort the includes of gpiolib-cdev.c to make it easier to identify if a > module is included and to avoid duplication. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 03/22] gpiolib: cdev: minor indentation fixes

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 06:02 Kent Gibson napisał(a): > > Make indentation consistent with other use to improve readability. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 01/22] gpiolib: move gpiolib-sysfs function declarations into their own header

2020-06-24 Thread Bartosz Golaszewski
iolib-sysfs into line with gpiolib-cdev, and is another step > towards removing the sysfs inferface. > > Signed-off-by: Kent Gibson > Reviewed-by: Bartosz Golaszewski

Re: [PATCH] gpio: add GPO driver for PCA9570

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 08:05 Sungbo Eo napisał(a): > > This patch adds support for the PCA9570 I2C GPO expander. > > Signed-off-by: Sungbo Eo Hi Sungbo, this looks pretty good, but there are some nits listed below. > --- > Tested in kernel 5.4 on an ipq40xx platform. > > This is my first time

Re: [PATCH 2/2] gpio: aggregator: Use bitmap_parselist() for parsing GPIO offsets

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 16:57 Geert Uytterhoeven napisał(a): > > Replace the custom code to parse GPIO offsets and/or GPIO offset ranges > by a call to bitmap_parselist(), and an iteration over the returned bit > mask. > > This should have no impact on the format of the configuration parameters >

Re: [PATCH] gpio: Drop superfluous dependencies on GPIOLIB

2020-06-24 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 16:40 Geert Uytterhoeven napisał(a): > > All config options for GPIO drivers are inside a big "if GPIOLIB ... > endif" block, so there is no reason for individual config options to > have expicit dependencies on GPIOLIB. Hence remove them. > > Signed-off-by: Geert Uytterhoeven

Re: [PATCH V4 3/7] devicetree-binding: Add pmc gpio node

2020-06-24 Thread Bartosz Golaszewski
śr., 17 cze 2020 o 13:37 Srinivas Neeli napisał(a): > > From: Shubhrajyoti Datta > > Add the pmc gpio node to the device tree. > > Versal devices are the industry's first adaptive compute > acceleration platforms. >

Re: [PATCH V4 0/7] gpio: zynq: Update on gpio-zynq driver

2020-06-24 Thread Bartosz Golaszewski
śr., 17 cze 2020 o 13:37 Srinivas Neeli napisał(a): > > This patch series does the following: > -protect direction in/out with a spinlock > -Add binding for Versal gpio > -Add binding for pmc gpio node > -Add Versal support > -Disable the irq if it is not a wakeup source > -Add pmc gpio support >

Re: [PATCH 14/15] net: phy: add PHY regulator support

2020-06-23 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 11:56 Russell King - ARM Linux admin napisał(a): > > On Tue, Jun 23, 2020 at 11:46:15AM +0200, Bartosz Golaszewski wrote: > > wt., 23 cze 2020 o 11:43 Russell King - ARM Linux admin > > napisał(a): > > > > > > On Tue, Jun 23, 2020 at 11:41:1

Re: [PATCH 14/15] net: phy: add PHY regulator support

2020-06-23 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 11:43 Russell King - ARM Linux admin napisał(a): > > On Tue, Jun 23, 2020 at 11:41:11AM +0200, Bartosz Golaszewski wrote: > > pon., 22 cze 2020 o 15:29 Russell King - ARM Linux admin > > napisał(a): > > > > > > > [snip!] > > > &

Re: [PATCH 14/15] net: phy: add PHY regulator support

2020-06-23 Thread Bartosz Golaszewski
pon., 22 cze 2020 o 15:29 Russell King - ARM Linux admin napisał(a): > [snip!] > > This is likely to cause issues for some PHY drivers. Note that we have > some PHY drivers which register a temperature sensor in the probe > function, which means they can be accessed independently of the

Re: [PATCH 13/15] net: phy: mdio: add support for PHY supply regulator

2020-06-23 Thread Bartosz Golaszewski
pon., 22 cze 2020 o 15:25 Russell King - ARM Linux admin napisał(a): > > On Mon, Jun 22, 2020 at 11:37:42AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Currently many MAC drivers control the regulator supplying the PHY but > > this is con

Re: [PATCH 03/11] net: devres: relax devm_register_netdev()

2020-06-23 Thread Bartosz Golaszewski
wt., 23 cze 2020 o 00:49 Jakub Kicinski napisał(a): > > On Mon, 22 Jun 2020 12:00:48 +0200 Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > This devres helper registers a release callback that only unregisters > > the net_device. It works perf

Re: [PATCH] gpio: rcar: handle pm_runtime_get_sync failure case

2020-06-23 Thread Bartosz Golaszewski
pt., 5 cze 2020 o 04:49 Navid Emamdoost napisał(a): > > Calling pm_runtime_get_sync increments the counter even in case of > failure, causing incorrect ref count. Call pm_runtime_put if > pm_runtime_get_sync fails. > > Signed-off-by: Navid Emamdoost > --- > drivers/gpio/gpio-rcar.c | 4 +++- >

Re: [PATCH v2] gpio: rcar: handle pm_runtime_get_sync failure case

2020-06-22 Thread Bartosz Golaszewski
śr., 17 cze 2020 o 09:43 Geert Uytterhoeven napisał(a): > > On Wed, Jun 17, 2020 at 9:40 AM Navid Emamdoost > wrote: > > Calling pm_runtime_get_sync increments the counter even in case of > > failure, causing incorrect ref count. Call pm_runtime_put if > > pm_runtime_get_sync fails. > > > >

Re: [PATCH] max732x_probe: remove redundant check

2020-06-22 Thread Bartosz Golaszewski
czw., 18 cze 2020 o 01:58 Gaurav Singh napisał(a): > > The check : if (pdata) is redundant since its already > dereferenced before: pdata->have_64bit_regs; > pdata is not initialized after that hence remove > this null check. > > Signed-off-by: Gaurav Singh > --- > drivers/gpio/gpio-max732x.c |

[PATCH 07/11] phy: mdio: add kerneldoc for __devm_mdiobus_register()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This function is not documented. Add a short kerneldoc description. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/mdio_devres.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/phy/mdio_devres.c b/drivers/net/phy/mdio_devres.c index

[PATCH 02/11] net: ethernet: ixgbe: don't call devm_mdiobus_free()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The idea behind devres is that the release callbacks are called if probe fails. As we now check the return value of ixgbe_mii_bus_init(), we can drop the call devm_mdiobus_free() in error path as the release callback will be called automatically. Signed-off-by: Bartosz

[PATCH 01/11] net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This function may fail. Check its return value and propagate the error code. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe

[PATCH 06/11] phy: un-inline devm_mdiobus_register()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Functions should only be static inline if they're very short. This devres helper is already over 10 lines and it will grow soon as we'll be improving upon its approach. Pull it into mdio_devres.c. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/Makefile

[PATCH 11/11] net: ethernet: mtk-star-emac: use devm_of_mdiobus_register()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Shrink the code by using the managed variant of of_mdiobus_register(). Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/mediatek/mtk_star_emac.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/mediatek

[PATCH 05/11] Documentation: devres: add missing mdio helper

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We have a devres variant of mdiobus_register() but it's not listed in devres.rst. Add it under other mdio devm functions. Signed-off-by: Bartosz Golaszewski --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 08/11] net: phy: don't abuse devres in devm_mdiobus_register()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We currently have two managed helpers for mdiobus - devm_mdiobus_alloc() and devm_mdiobus_register(). The idea behind devres is that the release callback releases whatever resource the devm function allocates. In the mdiobus case however there's no devres associated

[PATCH 09/11] of: mdio: remove the 'extern' keyword from function declarations

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The 'extern' keyword in headers doesn't have any benefit. Remove them all from the of_mdio.h header. Signed-off-by: Bartosz Golaszewski --- include/linux/of_mdio.h | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff

[PATCH 10/11] of: mdio: provide devm_of_mdiobus_register()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Implement a managed variant of of_mdiobus_register(). We need to reimplement the devres structure and the release callback because we can't put this function in drivers/net/phy/mdio_devres.c or we'd hit circular dependencies between module symbols. We also don't want

[PATCH 03/11] net: devres: relax devm_register_netdev()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This devres helper registers a release callback that only unregisters the net_device. It works perfectly fine with netdev structs that are not managed on their own. There's no reason to check this - drop the warning. Signed-off-by: Bartosz Golaszewski --- net

[PATCH 04/11] net: devres: rename the release callback of devm_register_netdev()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Make it an explicit counterpart to devm_register_netdev() just like we do with devm_free_netdev() for better clarity. Signed-off-by: Bartosz Golaszewski --- net/devres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/devres.c b/net

[PATCH 00/11] net: improve devres helpers

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski When I first submitted the series adding devm_register_netdev() I was told during review that it should check if the underlying struct net_device is managed too before proceeding. I initially accepted this as the right approach but in the back of my head something

[PATCH 10/15] net: phy: simplify phy_device_create()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The last argument passed to phy_device_create() (c45_ids) is never used in current mainline outside of the core PHY code - it can only be configured when reading the PHY ID from phy_device_read_id(). Let's drop this argument treewide. Signed-off-by: Bartosz

[PATCH 07/15] net: phy: split out the PHY driver request out of phy_device_create()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Move the code requesting the PHY driver module out of phy_device_create() into a separate helper. This will be later reused when we delay the module loading. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/phy_device.c | 71

[PATCH 01/15] net: phy: arrange headers in mdio_bus.c alphabetically

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/mdio_bus.c | 32 1 file changed, 16 insertions

[PATCH 06/15] net: phy: mdio: reset MDIO devices even if probe() is not implemented

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Similarily to PHY drivers - there's no reason to require probe() to be implemented in order to call mdio_device_reset(). MDIO devices can have resets defined without needing to do anything in probe(). Signed-off-by: Bartosz Golaszewski --- drivers/net/phy

[PATCH 09/15] net: phy: delay PHY driver probe until PHY registration

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Currently the PHY ID is read without taking the PHY out of reset. This can only work if no resets are defined. This change delays the ID read until we're actually registering the PHY device - this is needed because earlier (when creating the device) we don't have

[PATCH 12/15] dt-bindings: mdio: add phy-supply property to ethernet phy node

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The phy-supply property is often added to MAC nodes but this is wrong conceptually. These supplies should be part of the PHY node on the MDIO bus. Add phy-supply property at PHY level to mdio.yaml. Signed-off-by: Bartosz Golaszewski --- Documentation/devicetree

[PATCH 11/15] net: phy: drop get_phy_device()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski get_phy_device() has now become just a wrapper for phy_device_create() with the phy_id argument set to PHY_ID_NONE. Let's remove this function treewide and replace it with opencoded phy_device_create(). This has the advantage of being more explicit about the PHY

[PATCH 13/15] net: phy: mdio: add support for PHY supply regulator

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Currently many MAC drivers control the regulator supplying the PHY but this is conceptually wrong. The regulator should be defined as a property of the PHY node on the MDIO bus and controlled by the MDIO sub-system. Add support for an optional PHY regulator which

[PATCH 00/15] net: phy: correctly model the PHY voltage supply in DT

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski PHY devices on an MDIO bus can have their own regulators. This is currently mostly modeled using the semi-standard phy-supply property on the MAC node. This seems to be conceptually wrong though, as the MAC shouldn't need to care about enabling the PHY regulator

[PATCH 08/15] net: phy: check the PHY presence in get_phy_id()

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski get_phy_id() is only called from get_phy_device() so the check for the 0x1fff value can be pulled into the former. This way it'll be easier to remove get_phy_device() later on. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/phy_device.c | 8 1

[PATCH 15/15] ARM64: dts: mediatek: add a phy regulator to pumpkin-common.dtsi

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add the appropriate supply to the PHY child-node on the MDIO bus. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi b/arch

[PATCH 03/15] net: phy: arrange headers in phy_device.c alphabetically

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/phy_device.c | 28 ++-- 1 file changed, 14 insertions

[PATCH 02/15] net: phy: arrange headers in mdio_device.c alphabetically

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/mdio_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 14/15] net: phy: add PHY regulator support

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The MDIO sub-system now supports PHY regulators. Let's reuse the code to extend this support over to the PHY device. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/phy_device.c | 49 include/linux/phy.h | 10

[PATCH 04/15] net: mdio: add a forward declaration for reset_control to mdio.h

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This header refers to struct reset_control but doesn't include any reset header. The structure definition is probably somehow indirectly pulled in since no warnings are reported but for the sake of correctness add the forward declaration for struct reset_control

[PATCH 05/15] net: phy: reset the PHY even if probe() is not implemented

2020-06-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Currently we only call phy_device_reset() if the PHY driver implements the probe() callback. This is not mandatory and many drivers (e.g. realtek) don't need probe() for most devices but still can have reset GPIOs defined. There's no reason to depend on the presence

Re: [PATCH v3 1/2] dt-bindings: gpio: pca953x: add nxp,pcal9535

2020-06-16 Thread Bartosz Golaszewski
pon., 15 cze 2020 o 15:22 Jan Kiszka napisał(a): > > From: Jan Kiszka > > The NXP PCAL9535 is an extended variant of the PCA9535. > > Signed-off-by: Jan Kiszka > --- > Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH v3 2/2] gpio: pca953x: Add support for the PCAL9535

2020-06-16 Thread Bartosz Golaszewski
pon., 15 cze 2020 o 15:22 Jan Kiszka napisał(a): > > From: Jan Kiszka > > The PCAL9535 is compatible to the PCA9535. Additionally, it comes with > interrupt support and input latching. Other features are not supported > by the GPIO subsystem. > > Datasheet:

Re: [PATCH 03/17] drivers: gpio: Fix trivial spelling

2020-06-15 Thread Bartosz Golaszewski
wt., 9 cze 2020 o 14:46 Kieran Bingham napisał(a): > > The word 'descriptor' is misspelled throughout the tree. > > Fix it up accordingly: > decriptors -> descriptors > > Signed-off-by: Kieran Bingham > --- > drivers/gpio/TODO | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH] gpio: mpc8xxx: change the gpio interrupt flags.

2020-06-15 Thread Bartosz Golaszewski
czw., 11 cze 2020 o 12:43 Hui Song napisał(a): > > From: Song Hui > > Delete the interrupt IRQF_NO_THREAD flags in order to gpio interrupts > can be threaded to allow high-priority processes to preempt. > > Signed-off-by: Song Hui > --- > drivers/gpio/gpio-mpc8xxx.c | 2 +- > 1 file changed, 1

Re: [PATCH] drivers\gpio: use kobj_to_dev

2020-06-15 Thread Bartosz Golaszewski
pt., 12 cze 2020 o 10:05 Wang Qing napisał(a): > > Use kobj_to_dev() API instead of container_of(). > > Signed-off-by: Wang Qing > --- > drivers/gpio/gpiolib-sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > mode change 100644 => 100755 drivers/gpio/gpiolib-sysfs.c > > diff

Re: [PATCH] gpio: pca953x: Add support for the PCAL9535

2020-06-15 Thread Bartosz Golaszewski
sob., 13 cze 2020 o 16:44 Jan Kiszka napisał(a): > > From: Jan Kiszka > > The PCAL9535 [1] is compatible to the PCA9535. Additionally, it comes > with interrupt support and input latching. Other features are not > supported by the GPIO subsystem. > > [1]

Re: [PATCH 08/29] gpio: driver.h: fix kernel-doc markup

2020-06-15 Thread Bartosz Golaszewski
pon., 15 cze 2020 o 08:47 Mauro Carvalho Chehab napisał(a): > > There is one parameter with a wrong name at kernel-doc macro: > > ./include/linux/gpio/driver.h:499: warning: Function parameter or member 'gc' > not described in 'gpiochip_add_data' > ./include/linux/gpio/driver.h:499: warning:

[RESEND PATCH] irqchip/irq-mtk-sysirq: replace spinlock with raw_spinlock

2020-06-15 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This driver may take a regular spinlock when a raw spinlock (irq_desc->lock) is already taken which results in the following lockdep splat: = [ BUG: Invalid wait context ] 5.7.0-rc7 #1 Not tainted - swapper/

[PATCH] regmap: remove stray space

2020-06-15 Thread Bartosz Golaszewski
From: Bartosz Golaszewski There are two spaces between arguments in regmap_fields_update_bits_base() so remove one. Signed-off-by: Bartosz Golaszewski --- Hi Mark, I noticed this while writing the previous patch, so I guess we can fix it. Bart drivers/base/regmap/regmap.c | 2 +- 1 file

[PATCH] regmap: convert all regmap_update_bits() and co. macros to static inlines

2020-06-15 Thread Bartosz Golaszewski
From: Bartosz Golaszewski There's no reason to have these as macros. Let's convert them all to static inlines for better readability and stronger typing. Suggested-by: Mark Brown Signed-off-by: Bartosz Golaszewski --- include/linux/regmap.h | 222 +++-- 1

Re: [PATCH 2/2] gpiolib: cdev: fix file comment

2020-06-12 Thread Bartosz Golaszewski
- * GPIOs can sometimes cost only an instruction or two per bit. > + * The GPIO character device, /dev/gpiochipN, provides userspace an > + * interface to gpiolib GPIOs via ioctl()s. > */ > > /* > -- > 2.27.0 > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 1/2] gpiolib: cdev: fix -Wmissing-prototypes warnings

2020-06-12 Thread Bartosz Golaszewski
; > > #include "gpiolib.h" > +#include "gpiolib-cdev.h" > > /* Implementation infrastructure for GPIO interfaces. > * > -- > 2.27.0 > Reviewed-by: Bartosz Golaszewski

Re: [PATCH] net: ethernet: mtk-star-emac: simplify interrupt handling

2020-06-11 Thread Bartosz Golaszewski
czw., 11 cze 2020 o 21:51 David Miller napisał(a): > > From: Bartosz Golaszewski > Date: Thu, 11 Jun 2020 16:01:39 +0200 > > > Unfortunately after thorough testing of current mainline, we noticed the > > driver has become unstable under heavy load. While this is hard to &

[PATCH] net: ethernet: mtk-star-emac: simplify interrupt handling

2020-06-11 Thread Bartosz Golaszewski
From: Bartosz Golaszewski During development we tried to make the interrupt handling as fine-grained as possible with TX and RX interrupts being disabled/enabled independently and the counter registers reset from workqueue context. Unfortunately after thorough testing of current mainline, we

Re: [PATCH v2] gpiolib: split character device into gpiolib-cdev

2020-06-10 Thread Bartosz Golaszewski
cdev and core gpiolib code. > > > > Suggested-by: Bartosz Golaszewski > > Signed-off-by: Kent Gibson > > Patch applied as early v5.9 development. > > I will include it into linux-next after v5.8-rc1 is out. > Hi Linus, FYI there's a v3 already on the list with a minor fix. Bart

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-06-09 Thread Bartosz Golaszewski
wt., 9 cze 2020 o 11:43 Kent Gibson napisał(a): > > On Tue, Jun 09, 2020 at 10:03:42AM +0200, Bartosz Golaszewski wrote: > > sob., 6 cze 2020 o 03:56 Kent Gibson napisał(a): > > > > > > > [snip!] > > > > > > > > > > I'd say yes - co

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-06-09 Thread Bartosz Golaszewski
sob., 6 cze 2020 o 03:56 Kent Gibson napisał(a): > [snip!] > > > > I'd say yes - consolidation and reuse of data structures is always > > good and normally they are going to be wrapped in some kind of > > low-level user-space library anyway. > > > > Ok, and I've changed the values field name to

Re: [PATCH v4 12/13] gpiolib: add new ioctl() for monitoring changes in line info

2020-06-09 Thread Bartosz Golaszewski
wt., 9 cze 2020 o 02:23 Kent Gibson napisał(a): > > On Tue, Dec 24, 2019 at 01:07:08PM +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > [snip!] > > > +static int lineinfo_changed_notify(struct notifier_block *nb, > > +

[PATCH] regmap: fix the kerneldoc for regmap_test_bits()

2020-06-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The kerneldoc comment for regmap_test_bits() says that it returns -1 on regmap_read() failure. This is not true - it will propagate the error code returned by regmap_read(). Fix it. Fixes: aa2ff9dbaedd ("regmap: provide helpers for simple bit operations")

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-06-05 Thread Bartosz Golaszewski
czw., 4 cze 2020 o 18:00 Kent Gibson napisał(a): > [snip!] > > > + > > > +enum gpioline_edge { > > > + GPIOLINE_EDGE_NONE = 0, > > > + GPIOLINE_EDGE_RISING= 1, > > > + GPIOLINE_EDGE_FALLING = 2, > > > + GPIOLINE_EDGE_BOTH =

Re: [PATCH v2] gpiolib: split character device into gpiolib-cdev

2020-06-05 Thread Bartosz Golaszewski
pt., 5 cze 2020 o 01:30 Kent Gibson napisał(a): > > On Thu, Jun 04, 2020 at 06:22:43PM +0200, Bartosz Golaszewski wrote: > > czw., 4 cze 2020 o 16:18 Kent Gibson napisał(a): > > > > > > > > > > > Is this comment relevant for the character device? &

Re: [PATCH v2] gpiolib: split character device into gpiolib-cdev

2020-06-04 Thread Bartosz Golaszewski
czw., 4 cze 2020 o 16:18 Kent Gibson napisał(a): > > > > > Is this comment relevant for the character device? > > > > True - that comment should stay in gpiolib, and gpiolib-cdev should get > one of it's own. > > Any suggestions on how to maintain line history? > I know you can trick git by

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-06-04 Thread Bartosz Golaszewski
sob., 16 maj 2020 o 08:45 Kent Gibson napisał(a): > > Add a new version of the uAPI to address existing 32/64bit alignment > issues, add support for debounce, and provide some future proofing by > adding padding reserved for future use. > > Signed-off-by: Kent Gibson > I'm a bit late to the

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-06-04 Thread Bartosz Golaszewski
śr., 27 maj 2020 o 07:58 Linus Walleij napisał(a): > > On Mon, May 25, 2020 at 4:19 PM Kent Gibson wrote: > > > > > +struct gpioline_config { > > > > + __u8 default_values[GPIOLINES_MAX]; > > > > > > So 32 bytes > > > > > > > Actually that one is 64 bytes, which is the same as v1, i.e.

Re: [PATCH v2] gpiolib: split character device into gpiolib-cdev

2020-06-04 Thread Bartosz Golaszewski
wt., 2 cze 2020 o 16:11 Kent Gibson napisał(a): > > Split the cdev specific functionality out of gpiolib.c and into > gpiolib-cdev.c. This improves the readability and maintainability of both > the cdev and core gpiolib code. > > Suggested-by: Bartosz Golaszewski > Signe

[tip: irq/core] genirq/irq_sim: Simplify the API

2020-05-30 Thread tip-bot2 for Bartosz Golaszewski
The following commit has been merged into the irq/core branch of tip: Commit-ID: 337cbeb2c13eb4cab84f576fd402d7ae4ed31ae1 Gitweb: https://git.kernel.org/tip/337cbeb2c13eb4cab84f576fd402d7ae4ed31ae1 Author:Bartosz Golaszewski AuthorDate:Thu, 14 May 2020 10:39:01 +02:00

[tip: irq/core] irqdomain: Make irq_domain_reset_irq_data() available to non-hierarchical users

2020-05-30 Thread tip-bot2 for Bartosz Golaszewski
The following commit has been merged into the irq/core branch of tip: Commit-ID: 5c8f77a278737a6af44a892f0700d9aadb2b0de0 Gitweb: https://git.kernel.org/tip/5c8f77a278737a6af44a892f0700d9aadb2b0de0 Author:Bartosz Golaszewski AuthorDate:Thu, 14 May 2020 10:39:00 +02:00

Re: [PATCH] net: ethernet: mtk-star-emac: remove unused variable

2020-05-29 Thread Bartosz Golaszewski
pt., 29 maj 2020 o 10:26 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > The desc pointer is set but not used. Remove it. > > Reported-by: kbuild test robot > Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") >

[PATCH] net: ethernet: mtk-star-emac: remove unused variable

2020-05-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The desc pointer is set but not used. Remove it. Reported-by: kbuild test robot Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/mediatek/mtk_star_emac.c | 3 --- 1 file changed, 3

[PATCH v3 0/2] regmap: provide simple bitops and use them in a driver

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski I noticed that oftentimes I use regmap_update_bits() for simple bit setting or clearing. In this case the fourth argument is superfluous as it's always 0 or equal to the mask argument. This series proposes to add simple bit operations for setting, clearing and testing

[PATCH v3 2/2] net: ethernet: mtk-star-emac: use regmap bitops

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Shrink the code visually by replacing regmap_update_bits() with appropriate regmap bit operations where applicable. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 --- 1 file changed, 35 insertions(+), 45

[PATCH v3 1/2] regmap: provide helpers for simple bit operations

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski In many instances regmap_update_bits() is used for simple bit setting and clearing. In these cases the last argument is redundant and we can hide it with a static inline function. This adds three new helpers for simple bit operations: set_bits, clear_bits and test_bits

Re: [PATCH v2 1/2] regmap: provide helpers for simple bit operations

2020-05-28 Thread Bartosz Golaszewski
czw., 28 maj 2020 o 16:45 Mark Brown napisał(a): > > On Thu, May 28, 2020 at 04:22:40PM +0200, Bartosz Golaszewski wrote: > > > + return (val & bits) == bits ? 1 : 0; > > The tenery here is redundant, it's converting a boolean value into a > boolean value. Otherw

[PATCH v2 1/2] regmap: provide helpers for simple bit operations

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski In many instances regmap_update_bits() is used for simple bit setting and clearing. In these cases the last argument is redundant and we can hide it with a static inline function. This adds three new helpers for simple bit operations: set_bits, clear_bits and test_bits

[PATCH v2 0/2] regmap: provide simple bitops and use them in a driver

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski I noticed that oftentimes I use regmap_update_bits() for simple bit setting or clearing. In this case the fourth argument is superfluous as it's always 0 or equal to the mask argument. This series proposes to add simple bit operations for setting, clearing and testing

[PATCH v2 2/2] net: ethernet: mtk-star-emac: use regmap bitops

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Shrink the code visually by replacing regmap_update_bits() with appropriate regmap bit operations where applicable. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 --- 1 file changed, 35 insertions(+), 45

[PATCH net-next v2] dt-bindings: net: rename the bindings document for MediaTek STAR EMAC

2020-05-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The driver itself was renamed before getting merged into mainline, but the binding document kept the old name. This makes both names consistent. Signed-off-by: Bartosz Golaszewski --- v1 -> v2: - update the id field as well .../net/{mediatek,eth-mac.yaml => me

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