[PATCH] platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2

2021-02-22 Thread Alban Bedel
Like a few other system the Lenovo ThinkPad X1 Tablet Gen 2 miss the HEBC method, which prevent the power button from working. Add a quirk to enable the button array on this system family and fix the power button. Signed-off-by: Alban Bedel --- drivers/platform/x86/intel-hid.c | 7 +++ 1

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

2021-02-17 Thread Bedel, Alban
On Wed, 2021-02-17 at 16:19 +0200, Andy Shevchenko wrote: > 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 < > > > alban.be...@aerq.com> >

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

2021-02-17 Thread Bedel, Alban
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: > > > Hint: don't forget to include reviewers from previous version > > > > I added you

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

2021-02-16 Thread Bedel, Alban
On Mon, 2021-02-15 at 14:53 +0200, Andy Shevchenko wrote: > Hint: don't forget to include reviewers from previous version I added you to the CC list for the new patch, did I miss someone else? > On Thu, Feb 11, 2021 at 7:52 PM Alban Bedel > wrote: > > From a quick glance at var

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

2021-02-11 Thread Alban Bedel
ONF register when the GPIO API sets the drive mode of the pins. Signed-off-by: Alban Bedel --- v2: - Rename the feature flag to PCAL65xx_REGS as there is at least the PCAL6534 which also have this feature. - Fixed the typos in the log message. - Fixed the code style issues. --- driv

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

2021-02-02 Thread Bedel, Alban
On Tue, 2021-02-02 at 14:57 +0100, Linus Walleij wrote: > On Thu, Jan 28, 2021 at 4:36 PM Alban Bedel > wrote: > > > From a quick glance at various datasheet the PCAL6524 seems to be > > the > > only chip in this familly that support setting the drive mode of > >

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

2021-02-02 Thread Bedel, Alban
On Tue, 2021-02-02 at 12:42 +0100, Bartosz Golaszewski wrote: > On Thu, Jan 28, 2021 at 4:36 PM Alban Bedel > wrote: > > From a quick glance at various datasheet the PCAL6524 seems to be > > the > > only chip in this familly that support setting the drive mode of >

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

2021-01-28 Thread Alban Bedel
API set the drive mode of the pins. Signed-off-by: Alban Bedel --- drivers/gpio/gpio-pca953x.c | 64 +++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 825b362eb4b7..db0b3dab1490 100

[PATCH net v2] net: mscc: ocelot: Fix multicast to the CPU port

2021-01-19 Thread Alban Bedel
backporting easier. Signed-off-by: Alban Bedel Fixes: 9403c158b872 ("net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb entries") --- Changelog: v2: - Fix inside ocelot_mact_learn() as suggested by Vladimir Oltean to avoid changing the callers and making backport easier.

Re: [PATCH] net: mscc: ocelot: Fix multicast to the CPU port

2021-01-19 Thread Bedel, Alban
On Mon, 2021-01-18 at 18:55 +, Vladimir Oltean wrote: > Hi Alban, > > On Mon, Jan 18, 2021 at 05:03:17PM +0100, Alban Bedel wrote: > > Multicast entries in the MAC table use the high bits of the MAC > > address to encode the ports that should get the packets. But this &

[PATCH] net: mscc: ocelot: Fix multicast to the CPU port

2021-01-18 Thread Alban Bedel
this problem add a new `flags` parameter to ocelot_mact_learn() and set MAC_CPU_COPY when the CPU port is in the port set. We still leave the CPU port in the bitfield as it doesn't seems to hurt. Signed-off-by: Alban Bedel Fixes: 9403c158 (net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb

SECCOMP_IOCTL_NOTIF_ADDFD race condition

2020-11-26 Thread Alban Crequy
e not attached to any process but they reference each other, so they cannot be closed. What do you think? Is there a better solution? Cheers Alban

Re: [PATCH v4 0/2] NFS: Fix interaction between fs_context and user namespaces

2020-11-10 Thread Alban Crequy
ov 10 09:19 file-0 1048580 -rw---. 1 4294967294 42949672940 Nov 10 09:19 file-1000 1048581 -rw---. 1 4294967294 42949672940 Nov 10 09:19 file-3000 Alban On Mon, 2 Nov 2020 at 18:48, Sargun Dhillon wrote: > > This is effectively a resend, but re-based atop Anna's current tree.

[PATCH v4 2/3] dt-bindings: hwmon: Add the +vs supply to the lm75 bindings

2020-10-01 Thread Alban Bedel
Some boards might have a regulator that control the +VS supply, add it to the bindings. Signed-off-by: Alban Bedel Acked-by: Rob Herring --- v2: Removed the unneeded `maxItems` attribute --- Documentation/devicetree/bindings/hwmon/lm75.yaml | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v4 1/3] dt-bindings: hwmon: Convert lm75 bindings to yaml

2020-10-01 Thread Alban Bedel
In order to automate the verification of DT nodes convert lm75.txt to lm75.yaml. Signed-off-by: Alban Bedel --- v2: Fix the example to pass `make dt_binding_check` v4: Add the missing additionalProperties: false --- .../devicetree/bindings/hwmon/lm75.txt| 39 .../devicetree

[PATCH v4 0/3] hwmon: (lm75) Add regulator support

2020-10-01 Thread Alban Bedel
- Use dummy regulator insted of explicitly handling missing regulator v3: - Use a devm action to handle disabling the regulator v4: - Added the missing `additionalProperties: false` when converting the binding documentation to yaml Alban Bedel (3): dt-bindings: hwmon: Convert lm75

[PATCH v4 3/3] hwmon: (lm75) Add regulator support

2020-10-01 Thread Alban Bedel
Add regulator support for boards where the sensor first need to be powered up before it can be used. Signed-off-by: Alban Bedel --- v2: Rely on dummy regulators instead of explicitly handling missing regulator v3: Use a devm action to handle disabling the regulator --- drivers/hwmon/lm75.c

[PATCH v3 2/3] dt-bindings: hwmon: Add the +vs supply to the lm75 bindings

2020-09-29 Thread Alban Bedel
Some boards might have a regulator that control the +VS supply, add it to the bindings. Signed-off-by: Alban Bedel --- v2: Removed the unneeded `maxItems` attribute --- Documentation/devicetree/bindings/hwmon/lm75.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation

[PATCH v3 3/3] hwmon: (lm75) Add regulator support

2020-09-29 Thread Alban Bedel
Add regulator support for boards where the sensor first need to be powered up before it can be used. Signed-off-by: Alban Bedel --- v2: Rely on dummy regulators instead of explicitly handling missing regulator v3: Use a devm action to handle disabling the regulator --- drivers/hwmon/lm75.c

[PATCH v3 1/3] dt-bindings: hwmon: Convert lm75 bindings to yaml

2020-09-29 Thread Alban Bedel
In order to automate the verification of DT nodes convert lm75.txt to lm75.yaml. Signed-off-by: Alban Bedel --- v2: Fix the example to pass `make dt_binding_check` --- .../devicetree/bindings/hwmon/lm75.txt| 39 .../devicetree/bindings/hwmon/lm75.yaml | 60

[PATCH v3 0/3] hwmon: (lm75) Add regulator support

2020-09-29 Thread Alban Bedel
v2: - Fixed the DT example while converting to YAML - Removed the unneeded maxItems from the binding documentation - Use dummy regulator insted of explicitly handling missing regulator v3: - Use a devm action to handle disabling the regulator Alban Bedel (3): dt-bindings: hwmon

Re: [PATCH v2 3/3] hwmon: (lm75) Add regulator support

2020-09-29 Thread Bedel, Alban
On Mon, 2020-09-28 at 09:39 -0700, Guenter Roeck wrote: > On Mon, Sep 28, 2020 at 05:39:23PM +0200, Alban Bedel wrote: > > Add regulator support for boards where the sensor first need to be > > powered up before it can be used. > > > > Signed-off-by: Alban Bedel &g

[PATCH v2 3/3] hwmon: (lm75) Add regulator support

2020-09-28 Thread Alban Bedel
Add regulator support for boards where the sensor first need to be powered up before it can be used. Signed-off-by: Alban Bedel --- v2: Rely on dummy regulators instead of explicitly handling missing regulator --- drivers/hwmon/lm75.c | 23 +-- 1 file changed, 21

[PATCH v2 1/3] dt-bindings: hwmon: Convert lm75 bindings to yaml

2020-09-28 Thread Alban Bedel
In order to automate the verification of DT nodes convert lm75.txt to lm75.yaml. Signed-off-by: Alban Bedel --- v2: Fix the example to pass `make dt_binding_check` --- .../devicetree/bindings/hwmon/lm75.txt| 39 .../devicetree/bindings/hwmon/lm75.yaml | 60

[PATCH v2 0/3] hwmon: (lm75) Add regulator support

2020-09-28 Thread Alban Bedel
- Use dummy regulator insted of explicitly handling missing regulator Alban Bedel (3): dt-bindings: hwmon: Convert lm75 bindings to yaml dt-bindings: hwmon: Add the +vs supply to the lm75 bindings hwmon: (lm75) Add regulator support .../devicetree/bindings/hwmon/lm75.txt| 39

[PATCH v2 2/3] dt-bindings: hwmon: Add the +vs supply to the lm75 bindings

2020-09-28 Thread Alban Bedel
Some boards might have a regulator that control the +VS supply, add it to the bindings. Signed-off-by: Alban Bedel --- v2: Removed the unneeded `maxItems` attribute --- Documentation/devicetree/bindings/hwmon/lm75.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation

Re: [PATCH 3/3] hwmon: (lm75) Add regulator support

2020-09-28 Thread Bedel, Alban
On Thu, 2020-09-17 at 22:33 -0700, Guenter Roeck wrote: > On 9/17/20 3:18 AM, Alban Bedel wrote: > > Add regulator support for boards where the sensor first need to be > > powered up before it can be used. > > > > Signed-off-by: Alban Bedel > > -

[PATCH 2/3] dt-bindings: hwmon: Add the +vs supply to the lm75 bindings

2020-09-17 Thread Alban Bedel
Some boards might have a regulator that control the +VS supply, add it to the bindings. Signed-off-by: Alban Bedel --- Documentation/devicetree/bindings/hwmon/lm75.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation

[PATCH 1/3] dt-bindings: hwmon: Convert lm75 bindings to yaml

2020-09-17 Thread Alban Bedel
In order to automate the verification of DT nodes convert lm75.txt to lm75.yaml. Signed-off-by: Alban Bedel --- .../devicetree/bindings/hwmon/lm75.txt| 39 - .../devicetree/bindings/hwmon/lm75.yaml | 55 +++ 2 files changed, 55 insertions(+), 39

[PATCH 3/3] hwmon: (lm75) Add regulator support

2020-09-17 Thread Alban Bedel
Add regulator support for boards where the sensor first need to be powered up before it can be used. Signed-off-by: Alban Bedel --- drivers/hwmon/lm75.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75

[PATCH 0/3] hwmon: (lm75) Add regulator support

2020-09-17 Thread Alban Bedel
Hi everybody, this small series add regulator support to the lm75 driver for boards that don't always power such a sensor. While at it also convert the DT bindings to yaml. Alban Bedel (3): dt-bindings: hwmon: Convert lm75 bindings to yaml dt-bindings: hwmon: Add the +vs supply to the lm75

[PATCH bpf-next v1 5/7] tools: bpftool: support loading map by fd from parent process

2019-03-20 Thread Alban Crequy
From: Alban Crequy Using a file descriptor passed by the parent process enables applications to fork a bpftool command to inspect a map they know by file descriptor even when they don't support bpffs or map ids. Documentation and bash completion updated as well. Signed-off-by: Alban Crequy

Re: [PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-07 Thread Alban Crequy
2019 at 6:32 PM Jakub Kicinski wrote: > > On Tue, 5 Mar 2019 17:38:03 +0100, Alban Crequy wrote: > > From: Alban Crequy > > > > Before this patch, there was no way to fill attr.inner_map_fd, necessary > > for array_of_maps or hash_of_maps. > > > > Thi

[PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-05 Thread Alban Crequy
From: Alban Crequy Before this patch, there was no way to fill attr.inner_map_fd, necessary for array_of_maps or hash_of_maps. This patch adds keyword 'innermap' to pass the innermap, either as an id or as a pinned map. Example of commands: $ sudo bpftool map create /sys/fs/bpf/innermap type

Re: [PATCH bpf v2] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
f6b425f932 On Fri, Feb 22, 2019 at 2:19 PM Alban Crequy wrote: > > From: Alban Crequy > > trie_delete_elem() was deleting an entry even though it was not matching > if the prefixlen was correct. This patch adds a check on matchlen. > > Reproducer: > > $ sudo bpftool map c

[PATCH bpf v2] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
From: Alban Crequy trie_delete_elem() was deleting an entry even though it was not matching if the prefixlen was correct. This patch adds a check on matchlen. Reproducer: $ sudo bpftool map create /sys/fs/bpf/mylpm type lpm_trie key 8 value 1 entries 128 name mylpm flags 1 $ sudo bpftool map

Re: [PATCH bpf-next v1] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
On Thu, Feb 21, 2019 at 11:24 PM Martin Lau wrote: > > On Thu, Feb 21, 2019 at 05:39:26PM +0100, Alban Crequy wrote: > > From: Alban Crequy > > > > trie_delete_elem() was deleting an entry even though it was not matching > > if the prefixlen was correct. This

[PATCH bpf-next v1] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-21 Thread Alban Crequy
From: Alban Crequy trie_delete_elem() was deleting an entry even though it was not matching if the prefixlen was correct. This patch adds a check on matchlen. Reproducer: $ sudo bpftool map create /sys/fs/bpf/mylpm type lpm_trie key 8 value 1 entries 128 name mylpm flags 1 $ sudo bpftool map

[PATCH bpf-next v2] bpf: bpftool, fix documentation for attach types

2019-02-19 Thread Alban Crequy
From: Alban Crequy bpftool has support for attach types "stream_verdict" and "stream_parser" but the documentation was referring to them as "skb_verdict" and "skb_parse". The inconsistency comes from commit b7d3826c2ed6 ("bpf: bpftool, add support

Re: [PATCH] bpf: bpftool, fix documentation for attach types

2019-02-19 Thread Alban Crequy
On Mon, Feb 11, 2019 at 2:26 PM Quentin Monnet wrote: > > 2019-02-11 13:54 UTC+0100 ~ Alban Crequy > > From: Alban Crequy > > > > bpftool has support for attach types "stream_verdict" and > > "stream_parser" but the documentation was refer

[PATCH] bpf: bpftool, fix documentation for attach types

2019-02-11 Thread Alban Crequy
From: Alban Crequy bpftool has support for attach types "stream_verdict" and "stream_parser" but the documentation was referring to them with "skb_verdict" and "skb_parse". The inconsistency comes from commit b7d3826c2ed6 ("bpf: bpftool, add support

[PATCH 6/6] MAINTAINERS: Add an entry for the ath79 SPI driver

2019-01-16 Thread Alban Bedel
Add myself as the maintainer for the ath79 SPI driver. Signed-off-by: Alban Bedel --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 71e2965fc656..a03ab41489cf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2520,6 +2520,15 @@ S

[PATCH 3/6] spi: ath79: Enable support for compile test

2019-01-16 Thread Alban Bedel
. Signed-off-by: Alban Bedel --- arch/mips/ath79/dev-spi.h | 2 +- drivers/spi/Kconfig | 2 +- drivers/spi/spi-ath79.c | 15 --- .../linux/platform_data/spi-ath79.h | 0 4 files changed, 14

[PATCH 5/6] spi: ath79: Remove some useless includes

2019-01-16 Thread Alban Bedel
Several include are not needed, remove them to keep the list clean. Signed-off-by: Alban Bedel --- drivers/spi/spi-ath79.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index 847f354ebef1..257acfb07819 100644 --- a/drivers/spi/spi-ath79

[PATCH 4/6] spi: ath79: Remove now useless code

2019-01-16 Thread Alban Bedel
The custom setup/cleanup routines included in the ath79 driver only take care of setting the initial CS state. However that is already handled by the bitbang code, so this code can be removed. Signed-off-by: Alban Bedel --- drivers/spi/spi-ath79.c | 43

[PATCH 2/6] spi: ath79: Simplify ath79_spi_chipselect()

2019-01-16 Thread Alban Bedel
and data bits during the controller setup. This also remove the last direct usage of the GPIO API, so we can remove the direct dependency on GPIOLIB. Signed-off-by: Alban Bedel --- drivers/spi/Kconfig | 2 +- drivers/spi/spi-ath79.c | 40 +--- 2 files

[PATCH 1/6] spi: bitbang: Don't call chipselect() in spi_bitbang_setup()

2019-01-16 Thread Alban Bedel
spi_setup() already call spi_set_cs() right after calling the controller setup method, so there is no need for the bitbang driver to do that. Because of this the chipselect() callback was confusingly still called when CS is GPIO based. Signed-off-by: Alban Bedel --- drivers/spi/spi-bitbang.c

Re: [PATCH 3/8] nvmem: Add nvmem_cell_get_optional and devm_nvmem_cell_get_optional

2019-01-16 Thread Alban
On Tue, 15 Jan 2019 12:40:53 + Srinivas Kandagatla wrote: > On 06/01/2019 19:28, Alban Bedel wrote: > > Add helper functions to make the driver code simpler when a cell is > > optional. Using these functions just return NULL when the cell doesn't > > exists or

[PATCH 2/2] phy: ath79-usb: Fix the main reset name to match the DT binding

2019-01-07 Thread Alban Bedel
it. This patch fix the driver to match the new binding. Signed-off-by: Alban Bedel --- drivers/phy/qualcomm/phy-ath79-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-ath79-usb.c b/drivers/phy/qualcomm/phy-ath79-usb.c index f7d64f3910b4..09a77e556ece

[PATCH] MIPS: ath79: Enable OF serial ports in the default config

2019-01-07 Thread Alban Bedel
CONFIG_SERIAL_OF_PLATFORM is needed to get a working console on the OF boards, enable it in the default config to get a working setup out of the box. Signed-off-by: Alban Bedel --- arch/mips/configs/ath79_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/configs

[PATCH 1/2] phy: ath79-usb: Fix the power on error path

2019-01-07 Thread Alban Bedel
In the power on function the error path doesn't return the suspend override to its proper state. It should should deassert this reset line to enable the suspend override. Signed-off-by: Alban Bedel --- drivers/phy/qualcomm/phy-ath79-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/2] phy: ath79-usb: Fix the power on error path

2019-01-07 Thread Alban Bedel
In the power on function the error path doesn't return the suspend override to its proper state. It should should deassert this reset line to enable the suspend override. Signed-off-by: Alban Bedel --- drivers/phy/qualcomm/phy-ath79-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 8/8] nvmem: core: Avoid useless iterations in nvmem_cell_get_from_lookup()

2019-01-06 Thread Alban Bedel
Once the correct cell has been found there is no need to continue iterating, just stop there. While at it replace the goto used to leave the loop with simple break statements. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH 3/8] nvmem: Add nvmem_cell_get_optional and devm_nvmem_cell_get_optional

2019-01-06 Thread Alban Bedel
Add helper functions to make the driver code simpler when a cell is optional. Using these functions just return NULL when the cell doesn't exists or if nvmem is disabled. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 48 ++ include/linux/nvmem

[PATCH 7/8] nvmem: core: Fix device reference leak

2019-01-06 Thread Alban Bedel
-by: Alban Bedel --- drivers/nvmem/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 2fa97b373601..176fe72f4eb5 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -811,6 +811,7 @@ static struct nvmem_device *__nvmem_device_get

[PATCH 6/8] nvmem: core: Always reference the device returned by nvmem_device_get()

2019-01-06 Thread Alban Bedel
the reference count like it is done in the DT path. To fix this we replace the call to nvmem_find() with a call to __nvmem_device_get() which does all the referencing and return a proper ERR_PTR in case of error. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 2 +- 1 file changed, 1

[PATCH 4/8] nvmem: core: Fix cell lookup when no cell is found

2019-01-06 Thread Alban Bedel
in a struct nvmem_cell the iteration variable then contains an invalid value. This is easily solved by using a variable to iterate over the list and one to return the cell found. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions

[PATCH 5/8] nvmem: core: Properly handle connection ID in of_nvmem_device_get()

2019-01-06 Thread Alban Bedel
to properly implement an optional connection. Return -ENOENT instead to let the caller know that the connection doesn't exists. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c

[PATCH 2/8] nvmem: core: Fix of_nvmem_cell_get() for optional cells

2019-01-06 Thread Alban Bedel
of_nvmem_cell_get() should return -ENOENT when a cell isn't defined, otherwise callers can't distinguish between a missing cell and other errors. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/core.c b

[PATCH 0/8] nvmem: Various small fixes and improvements

2019-01-06 Thread Alban Bedel
Hi, this series is mostly small bug fixes, but also add a new API to make things simpler in drivers that need to request an optional cell. Alban Bedel (8): nvmem: core: Set the provider read-only when no write callback is given nvmem: core: Fix of_nvmem_cell_get() for optional cells

[PATCH 1/8] nvmem: core: Set the provider read-only when no write callback is given

2019-01-06 Thread Alban Bedel
If no write callback is given the device should be marked as read-only. While at it also move from a bit or to a logical or as that is a logical expression. Signed-off-by: Alban Bedel --- drivers/nvmem/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Alban Crequy
On Sat, Sep 29, 2018 at 12:35 PM Aleksa Sarai wrote: > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-30 Thread Alban Crequy
On Sat, Sep 29, 2018 at 12:35 PM Aleksa Sarai wrote: > > The need for some sort of control over VFS's path resolution (to avoid > malicious paths resulting in inadvertent breakouts) has been a very > long-standing desire of many userspace applications. This patchset is a > revival of Al Viro's

Re: [PATCH v2 06/29] mtd: Add support for reading MTD devices via the nvmem API

2018-08-21 Thread Alban
On Tue, 21 Aug 2018 14:57:25 +0200 Boris Brezillon wrote: > On Tue, 21 Aug 2018 14:27:16 +0200 > Alban wrote: > > > On Tue, 21 Aug 2018 07:44:04 +0200 > > Boris Brezillon wrote: > > > > > On Tue, 21 Aug 2018 00:53:27 +0200 > > > Alban wrote: &g

Re: [PATCH v2 06/29] mtd: Add support for reading MTD devices via the nvmem API

2018-08-21 Thread Alban
On Tue, 21 Aug 2018 14:57:25 +0200 Boris Brezillon wrote: > On Tue, 21 Aug 2018 14:27:16 +0200 > Alban wrote: > > > On Tue, 21 Aug 2018 07:44:04 +0200 > > Boris Brezillon wrote: > > > > > On Tue, 21 Aug 2018 00:53:27 +0200 > > > Alban wrote: &g

Re: [PATCH linux-next] gpio: fix meaningless return expression

2018-07-26 Thread Alban
On Tue, 24 Jul 2018 19:57:43 +0800 zhong jiang wrote: > Fix the following sparse error: > > drivers/gpio/gpio-ath79.c:54:16: error: return expression in void > function > > Signed-off-by: zhong jiang Acked-by: Alban Bedel pgpyZ5jQ4E_lO.pgp Description: OpenPGP digital signature

Re: [PATCH linux-next] gpio: fix meaningless return expression

2018-07-26 Thread Alban
On Tue, 24 Jul 2018 19:57:43 +0800 zhong jiang wrote: > Fix the following sparse error: > > drivers/gpio/gpio-ath79.c:54:16: error: return expression in void > function > > Signed-off-by: zhong jiang Acked-by: Alban Bedel pgpyZ5jQ4E_lO.pgp Description: OpenPGP digital signature

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-10 Thread Alban
On Sun, 10 Jun 2018 11:32:36 +0100 Srinivas Kandagatla wrote: > On 08/06/18 18:07, Alban wrote: > > On Fri, 8 Jun 2018 12:34:12 +0100 > > Srinivas Kandagatla wrote: > > > ... > > > > I looked into this. It would work fine for the cells but not so

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-10 Thread Alban
On Sun, 10 Jun 2018 11:32:36 +0100 Srinivas Kandagatla wrote: > On 08/06/18 18:07, Alban wrote: > > On Fri, 8 Jun 2018 12:34:12 +0100 > > Srinivas Kandagatla wrote: > > > ... > > > > I looked into this. It would work fine for the cells but not so

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-08 Thread Alban
3e1369c 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -859,6 +859,14 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, if (!nvmem_np) return ERR_PTR(-EINVAL); + /* bindings that already have anonymous child nodes can instead put +* their cells in a child node with an nvmem-cells compatible. */ + if (of_device_is_compatible(nvmem_np, "nvmem-cells")) { + nvmem_np = of_get_next_parent(nvmem_np); + if (!nvmem_np) + return ERR_PTR(-EINVAL); + } + nvmem = __nvmem_device_get(nvmem_np, NULL, NULL); of_node_put(nvmem_np); if (IS_ERR(nvmem)) What about it? Alban pgpbNxLP76wQA.pgp Description: OpenPGP digital signature

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-08 Thread Alban
3e1369c 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -859,6 +859,14 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, if (!nvmem_np) return ERR_PTR(-EINVAL); + /* bindings that already have anonymous child nodes can instead put +* their cells in a child node with an nvmem-cells compatible. */ + if (of_device_is_compatible(nvmem_np, "nvmem-cells")) { + nvmem_np = of_get_next_parent(nvmem_np); + if (!nvmem_np) + return ERR_PTR(-EINVAL); + } + nvmem = __nvmem_device_get(nvmem_np, NULL, NULL); of_node_put(nvmem_np); if (IS_ERR(nvmem)) What about it? Alban pgpbNxLP76wQA.pgp Description: OpenPGP digital signature

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-08 Thread Alban
On Thu, 7 Jun 2018 18:03:16 +0100 Srinivas Kandagatla wrote: > On 07/06/18 17:41, Alban wrote: > > AFAIU the only thing that we disagree on now is if the nodes > > representing the cells should be direct children of the provider > > or in a dedicated subnode. For the MTD cas

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-08 Thread Alban
On Thu, 7 Jun 2018 18:03:16 +0100 Srinivas Kandagatla wrote: > On 07/06/18 17:41, Alban wrote: > > AFAIU the only thing that we disagree on now is if the nodes > > representing the cells should be direct children of the provider > > or in a dedicated subnode. For the MTD cas

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-07 Thread Alban
On Tue, 1 May 2018 17:49:03 +0100 Srinivas Kandagatla wrote: > On 18/04/18 14:34, Alban wrote: > > On Wed, 18 Apr 2018 13:53:56 +0100 > > Srinivas Kandagatla wrote: > > > >> On 18/04/18 13:32, Alban wrote: > >>>> I was also sugge

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-06-07 Thread Alban
On Tue, 1 May 2018 17:49:03 +0100 Srinivas Kandagatla wrote: > On 18/04/18 14:34, Alban wrote: > > On Wed, 18 Apr 2018 13:53:56 +0100 > > Srinivas Kandagatla wrote: > > > >> On 18/04/18 13:32, Alban wrote: > >>>> I was also sugge

Re: [PATCH v3 4/4] seccomp: add support for passing fds via USER_NOTIF

2018-06-02 Thread Alban Crequy
On Thu, 31 May 2018 at 16:52, Tycho Andersen wrote: > > The idea here is that the userspace handler should be able to pass an fd > back to the trapped task, for example so it can be returned from socket(). > > I've proposed one API here, but I'm open to other options. In particular, > this only

Re: [PATCH v3 4/4] seccomp: add support for passing fds via USER_NOTIF

2018-06-02 Thread Alban Crequy
On Thu, 31 May 2018 at 16:52, Tycho Andersen wrote: > > The idea here is that the userspace handler should be able to pass an fd > back to the trapped task, for example so it can be returned from socket(). > > I've proposed one API here, but I'm open to other options. In particular, > this only

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-25 Thread Alban Crequy
_x64_sys_nanosleep cgid = 106b2 > 40674067 a.out __x64_sys_nanosleep cgid = 106b2 > 40674067a.out __x64_sys_nanosleep cgid = 106b2 > ^C[yhs@localhost tools]$ > The kernel and user space cgid matches. Will provide a > formal patch later. &

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-25 Thread Alban Crequy
om the kernel for the > // process compiled with t.c and ran under /home/yhs/tmp/yhs: > $ sudo ./trace.py -p 4067 '__x64_sys_nanosleep "cgid = %llx", $cgid' > PID TID COMMFUNC - > 40674067a.out __x64_sys_nanosleep cgid

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Alban Crequy
On Mon, May 14, 2018 at 9:38 PM, Y Song <ys114...@gmail.com> wrote: > > On Sun, May 13, 2018 at 10:33 AM, Alban Crequy <alban.cre...@gmail.com> wrote: > > From: Alban Crequy <al...@kinvolk.io> > > > > bpf_get_current_cgroup_ino() allows BPF trace program

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Alban Crequy
On Mon, May 14, 2018 at 9:38 PM, Y Song wrote: > > On Sun, May 13, 2018 at 10:33 AM, Alban Crequy wrote: > > From: Alban Crequy > > > > bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode > > of the cgroup where the current process resides.

[PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-13 Thread Alban Crequy
From: Alban Crequy <al...@kinvolk.io> bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode of the cgroup where the current process resides. My use case is to get statistics about syscalls done by a specific Kubernetes container. I have a tracepoint on raw_syscalls/sys

[PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-13 Thread Alban Crequy
From: Alban Crequy bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode of the cgroup where the current process resides. My use case is to get statistics about syscalls done by a specific Kubernetes container. I have a tracepoint on raw_syscalls/sys_enter and a BPF map

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-18 Thread Alban
On Wed, 18 Apr 2018 13:53:56 +0100 Srinivas Kandagatla <srinivas.kandaga...@linaro.org> wrote: > On 18/04/18 13:32, Alban wrote: > >> I was also suggesting you to use nvmem-cell subnode, but make it a > >> proper nvmem provider device, rather than reusing its parent

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-18 Thread Alban
On Wed, 18 Apr 2018 13:53:56 +0100 Srinivas Kandagatla wrote: > On 18/04/18 13:32, Alban wrote: > >> I was also suggesting you to use nvmem-cell subnode, but make it a > >> proper nvmem provider device, rather than reusing its parent device. > >> > >> You

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-18 Thread Alban
On Wed, 18 Apr 2018 13:12:48 +0100 Srinivas Kandagatla <srinivas.kandaga...@linaro.org> wrote: > On 18/04/18 12:41, Alban wrote: > > On Tue, 17 Apr 2018 18:00:40 +0200 > > Alban <al...@free.fr> wrote: > > > >> On Tue, 17 Apr 2018 16:44:01 +0100

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-18 Thread Alban
On Wed, 18 Apr 2018 13:12:48 +0100 Srinivas Kandagatla wrote: > On 18/04/18 12:41, Alban wrote: > > On Tue, 17 Apr 2018 18:00:40 +0200 > > Alban wrote: > > > >> On Tue, 17 Apr 2018 16:44:01 +0100 > >> Srinivas Kandagatla wrote: > >> > &g

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-18 Thread Alban
On Tue, 17 Apr 2018 18:00:40 +0200 Alban <al...@free.fr> wrote: > On Tue, 17 Apr 2018 16:44:01 +0100 > Srinivas Kandagatla <srinivas.kandaga...@linaro.org> wrote: > > > Thanks for explaining, > > > > On 17/04/18 15:54, Alban wrote: > > > This

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-18 Thread Alban
On Tue, 17 Apr 2018 18:00:40 +0200 Alban wrote: > On Tue, 17 Apr 2018 16:44:01 +0100 > Srinivas Kandagatla wrote: > > > Thanks for explaining, > > > > On 17/04/18 15:54, Alban wrote: > > > This will not only allow reading the calibration data fr

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-17 Thread Alban
On Tue, 17 Apr 2018 16:44:01 +0100 Srinivas Kandagatla <srinivas.kandaga...@linaro.org> wrote: > Thanks for explaining, > > On 17/04/18 15:54, Alban wrote: > > This will not only allow reading the calibration data from nvmem, but > > will also create a partiti

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-17 Thread Alban
On Tue, 17 Apr 2018 16:44:01 +0100 Srinivas Kandagatla wrote: > Thanks for explaining, > > On 17/04/18 15:54, Alban wrote: > > This will not only allow reading the calibration data from nvmem, but > > will also create a partition on the MTD device, which is not acceptable.

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-17 Thread Alban
On Tue, 17 Apr 2018 13:54:07 +0100 Srinivas Kandagatla <srinivas.kandaga...@linaro.org> wrote: > On 24/03/18 23:24, Alban Bedel wrote: > > Having the cells as subnodes of the provider device without any > > compatible property might clash with other bindings. To avoid th

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-17 Thread Alban
On Tue, 17 Apr 2018 13:54:07 +0100 Srinivas Kandagatla wrote: > On 24/03/18 23:24, Alban Bedel wrote: > > Having the cells as subnodes of the provider device without any > > compatible property might clash with other bindings. To avoid this > > problem update the binding

Re: [PATCH v3 2/3] doc: bindings: Add bindings documentation for mtd nvmem

2018-04-17 Thread Alban
On Mon, 16 Apr 2018 16:08:51 -0500 Rob Herring <r...@kernel.org> wrote: > On Sun, Mar 25, 2018 at 12:24:58AM +0100, Alban Bedel wrote: > > Config data for drivers, like MAC addresses, is often stored in MTD. > > Add a binding that define how such data storage can be represent

Re: [PATCH v3 2/3] doc: bindings: Add bindings documentation for mtd nvmem

2018-04-17 Thread Alban
On Mon, 16 Apr 2018 16:08:51 -0500 Rob Herring wrote: > On Sun, Mar 25, 2018 at 12:24:58AM +0100, Alban Bedel wrote: > > Config data for drivers, like MAC addresses, is often stored in MTD. > > Add a binding that define how such data storage can be represented in > > device

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-17 Thread Alban
On Mon, 16 Apr 2018 16:04:29 -0500 Rob Herring <r...@kernel.org> wrote: > On Sun, Mar 25, 2018 at 12:24:57AM +0100, Alban Bedel wrote: > > Having the cells as subnodes of the provider device without any > > compatible property might clash with other bindings. To avoid th

Re: [PATCH v3 1/3] nvmem: Update the OF binding to use a subnode for the cells list

2018-04-17 Thread Alban
On Mon, 16 Apr 2018 16:04:29 -0500 Rob Herring wrote: > On Sun, Mar 25, 2018 at 12:24:57AM +0100, Alban Bedel wrote: > > Having the cells as subnodes of the provider device without any > > compatible property might clash with other bindings. To avoid this > > problem updat

Re: [PATCH] phy: Add a driver for the ATH79 USB phy

2018-04-15 Thread Alban
On Sat, 24 Mar 2018 23:38:40 +0100 Alban Bedel <al...@free.fr> wrote: > The ATH79 USB phy is very simple, it only have a reset. On some SoC a > second reset is used to force the phy in suspend mode regardless of the > USB controller status. > > This driver is added to

Re: [PATCH] phy: Add a driver for the ATH79 USB phy

2018-04-15 Thread Alban
On Sat, 24 Mar 2018 23:38:40 +0100 Alban Bedel wrote: > The ATH79 USB phy is very simple, it only have a reset. On some SoC a > second reset is used to force the phy in suspend mode regardless of the > USB controller status. > > This driver is added to the qualcom directory as

[PATCH] [RFC][WIP] namespace.c: Allow some unprivileged proc mounts when not fully visible

2018-04-04 Thread Alban Crequy
t proc proc /proc && echo ok" mount: /proc: permission denied. (this patch does not support /proc/cmdline as hideable) $ sudo unshare -p -f -m sh -c "mount --bind /dev/null /proc/kcore && unshare -U -r -p -m -f mount -t proc proc /proc && echo ok" ok (

  1   2   3   4   5   6   7   8   9   >