[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 adde

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 a

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

2021-02-11 Thread Alban Bedel
es the OUT_INDCONF 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 is

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
when the GPIO 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..d

[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
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 Etherne

SECCOMP_IOCTL_NOTIF_ADDFD race condition

2020-11-26 Thread Alban Crequy
et are 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
r-3000 1048579 -rw---. 1 1000 10000 Nov 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

[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
ation - 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

[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
ation - 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

[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

[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 C

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

2019-03-07 Thread Alban Crequy
ue, Mar 5, 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. > > >

[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/inn

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 referring t

[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 > > exis

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

2019-01-07 Thread Alban Bedel
g 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..09

[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 del

[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 del

[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/

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

2019-01-06 Thread Alban Bedel
: 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
ement 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 chang

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

2019-01-06 Thread Alban Bedel
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
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/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/nvme

[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 old

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 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 nice

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

2018-06-08 Thread Alban
.c index 4e94a78..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-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 suggesting

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 le

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

2018-05-25 Thread Alban Crequy
bytes = 8, handle_type = 1 > cgroup_id = 0x106b2 > // the below command to get cgroup_id from 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

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 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 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 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 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 from

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 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 to

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 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 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
mp; unshare -U -r -p -m -f mount -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

[PATCH v2] gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe()

2018-03-24 Thread Alban Bedel
!= res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun [al...@free.fr: Fixed patch to apply on current tree] Signed-off-by: Alban Bedel --- drivers/gpio/gpio-ath79.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath7

[PATCH v3 3/3] mtd: Add support for reading MTD devices via the nvmem API

2018-03-24 Thread Alban Bedel
Allow drivers that use the nvmem API to read data stored on MTD devices. For this the mtd devices are registered as read-only NVMEM providers. On OF systems only devices that have the 'nvmem-provider' property are registered, on non-OF system all MTD devices are registered. Signed-off

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

2018-03-24 Thread Alban Bedel
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 tree. Signed-off-by: Alban Bedel --- Changelog: v2: * Added a "Required properties" section with the nvmem-provider property v3: * Fix

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

2018-03-24 Thread Alban Bedel
that we can turn any kind of device in a nvmem provider. While discouraged for new uses the old scheme is still supported for backward compatibility. Signed-off-by: Alban Bedel --- Documentation/devicetree/bindings/nvmem/nvmem.txt | 55 --- drivers/nvmem/core.c

[PATCH v3 0/3] mtd: Add support for reading MTD devices via the nvmem API

2018-03-24 Thread Alban Bedel
binding or an nvmem cell. To avoid this problem we update the nvmem cell binding to use a 'nvmem-cells' subnode with compatible string to hold the list of nvmem cells. This new binding make sure that any kind of device can be used as nvmem provider. Alban Bedel (3): nvmem: Update the

[PATCH] usb: host: Remove the deprecated ATH79 USB host config options

2018-03-24 Thread Alban Bedel
option when the EHCI platform driver is enabled on the ATH79 platform. Signed-off-by: Alban Bedel --- arch/mips/Kconfig| 1 + drivers/usb/host/Kconfig | 25 - 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index

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

2018-03-24 Thread Alban Bedel
qualcom name. Signed-off-by: Alban Bedel --- MAINTAINERS | 8 +++ drivers/phy/qualcomm/Kconfig | 11 +++- drivers/phy/qualcomm/Makefile| 1 + drivers/phy/qualcomm/phy-ath79-usb.c | 108 +++ 4 files changed, 127

Re: [PATCH v2] MIPS: Allow compressed images to be loaded at any address

2018-03-12 Thread Alban
On Mon, 13 Feb 2017 22:19:45 + James Hogan wrote: > Hi Alban, > > On Mon, Feb 13, 2017 at 09:38:08PM +0100, Alban wrote: > > From: Alban Bedel > > > > Compressed images (vmlinuz.bin) have to be loaded at a specific > > address that differ from the add

Re: [RFC PATCH v4 1/2] fuse: introduce new fs_type flag FS_IMA_NO_CACHE

2018-02-05 Thread Alban Crequy
On Fri, Feb 2, 2018 at 5:10 PM, Miklos Szeredi wrote: > On Fri, Feb 2, 2018 at 4:33 PM, Mimi Zohar wrote: >> On Fri, 2018-02-02 at 10:20 -0500, Mimi Zohar wrote: >>> Hi Miklos, >>> >>> On Tue, 2018-01-30 at 19:06 +0100, Dongsu Park wrote: >>> >

[RFC PATCH v3 2/2] ima: force re-appraisal on filesystems with FS_IMA_NO_CACHE

2018-01-22 Thread Alban Crequy
From: Alban Crequy This patch forces files to be re-measured, re-appraised and re-audited on file systems with the feature flag FS_IMA_NO_CACHE. In that way, cached integrity results won't be used. How to test this: The test I did was using a patched version of the memfs FUSE driver [1][2

[RFC PATCH v3 0/2] ima,fuse: introduce new fs flag FS_IMA_NO_CACHE

2018-01-22 Thread Alban Crequy
om/linux-kernel@vger.kernel.org/msg1587678.html - rename flag to FS_IMA_NO_CACHE - split patch into 2 The patchset is also available in our github repo: https://github.com/kinvolk/linux/tree/alban/fuse-flag-ima-nocache-v3 Alban Crequy (2): fuse: introduce new fs_type flag FS_IMA_NO_CACHE

[RFC PATCH v3 1/2] fuse: introduce new fs_type flag FS_IMA_NO_CACHE

2018-01-22 Thread Alban Crequy
From: Alban Crequy This new fs_type flag FS_IMA_NO_CACHE means files should be re-measured, re-appraised and re-audited each time. Cached integrity results should not be used. It is useful in FUSE because the userspace FUSE process can change the underlying files at any time without notifying

Re: [RFC PATCH v2] ima,fuse: introduce new fs flag FS_NO_IMA_CACHE

2018-01-22 Thread Alban Crequy
On Fri, Jan 19, 2018 at 5:56 PM, Mimi Zohar wrote: > On Fri, 2018-01-19 at 11:35 +0100, Alban Crequy wrote: >> On Thu, Jan 18, 2018 at 10:25 PM, Mimi Zohar >> wrote: >> > On Tue, 2018-01-16 at 16:10 +0100, Alban Crequy wrote: >> >> From: Alban Crequy >&

Re: [RFC PATCH v2] ima,fuse: introduce new fs flag FS_NO_IMA_CACHE

2018-01-19 Thread Alban Crequy
On Thu, Jan 18, 2018 at 10:25 PM, Mimi Zohar wrote: > On Tue, 2018-01-16 at 16:10 +0100, Alban Crequy wrote: >> From: Alban Crequy >> >> This patch forces files to be re-measured, re-appraised and re-audited >> on file systems with the feature flag FS_NO_IMA_CA

Re: [PATCH v5 00/11] FUSE mounts from non-init user namespaces

2018-01-18 Thread Alban Crequy
ra 27. >> >> In general I am for this work, and more bodies and more eyes on it is >> generally better. >> >> I will review this after the New Year, I am out for the holidays right >> now. > > Thanks. I'll wait for your review. Hi Eric, Do you have

Re: [PATCH 08/11] fuse: Support fuse filesystems outside of init_user_ns

2018-01-18 Thread Alban Crequy
On Wed, Jan 17, 2018 at 8:31 PM, Seth Forshee wrote: > On Wed, Jan 17, 2018 at 07:56:59PM +0100, Alban Crequy wrote: >> On Wed, Jan 17, 2018 at 3:29 PM, Seth Forshee >> wrote: >> > On Wed, Jan 17, 2018 at 11:59:06AM +0100, Alban Crequy wrote: >> >> [Adding

Re: [PATCH 08/11] fuse: Support fuse filesystems outside of init_user_ns

2018-01-17 Thread Alban Crequy
On Wed, Jan 17, 2018 at 3:29 PM, Seth Forshee wrote: > On Wed, Jan 17, 2018 at 11:59:06AM +0100, Alban Crequy wrote: >> [Adding Tejun, David, Tom for question about cuse] >> >> On Fri, Dec 22, 2017 at 3:32 PM, Dongsu Park wrote: >> > From: Seth Forshee >> &g

Re: [PATCH 08/11] fuse: Support fuse filesystems outside of init_user_ns

2018-01-17 Thread Alban Crequy
s if the dev node can be provided otherwise and if we don't have a use case for it. Thoughts? [1] https://github.com/fuse4x/fuse/blob/master/example/cusexmp.c#L9 Cheers, Alban > Patch v4 is available: https://patchwork.kernel.org/patch/8944661/ > > Cc: linux-fsde...@vger.k

[RFC PATCH v2] ima,fuse: introduce new fs flag FS_NO_IMA_CACHE

2018-01-16 Thread Alban Crequy
From: Alban Crequy This patch forces files to be re-measured, re-appraised and re-audited on file systems with the feature flag FS_NO_IMA_CACHE. In that way, cached integrity results won't be used. For now, this patch adds the new flag only FUSE filesystems. This is needed because the user

  1   2   3   4   5   >