* Re: [PATCH 01/11] i2c: add helpers for locking the I2C segment
From: Wolfram Sang @ 2018-06-18 11:54 UTC (permalink / raw)
To: Peter Rosin
Cc: linux-kernel, Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe,
Arnd Bergmann, Greg Kroah-Hartman, Brian Norris, Gregory Fong,
Florian Fainelli, bcm-kernel-feedback-list, Sekhar Nori,
Kevin Hilman, Haavard Skinnemoen, Kukjin Kim, Krzysztof Kozlowski,
Orson Zhai, Baolin Wang, Chunyan Zhang, Laxman Dewangan,
Thierry Reding
In-Reply-To: <b860025e-3d4b-f333-80b4-3831dd969757@axentia.se>
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
> > I wonder if i2c_lock_segment() and i2c_lock_root_adapter() are really
> > more readable and convenient than i2c_lock_bus() with the flag. I think
> > the flags have speaking names, too.
> >
> > Is that an idea to remove these functions altogether and start using
> > i2c_lock_bus()?
>
> That would be fine with me. I don't have a strong opinion and agree that
> both are readable enough...
>
> It would make for a reduction of the number of lines so that's nice, but
> the macro in drivers/i2c/busses/i2c-gpio.c (patch 11) would not fit in
> the current \-width (or whatever you'd call that line of backslashes to
> the right in a multi-line macro).
>
> Does anyone have a strong opinion?
I have a strong opinion on making i2c.h less bloated. And yes, less
number of lines is nice, too. I think that surely pays off the
whitespace exception.
Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH 01/11] i2c: add helpers for locking the I2C segment
From: Peter Rosin @ 2018-06-18 11:32 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-kernel, Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe,
Arnd Bergmann, Greg Kroah-Hartman, Brian Norris, Gregory Fong,
Florian Fainelli, bcm-kernel-feedback-list, Sekhar Nori,
Kevin Hilman, Haavard Skinnemoen, Kukjin Kim, Krzysztof Kozlowski,
Orson Zhai, Baolin Wang, Chunyan Zhang, Laxman Dewangan,
Thierry Reding
In-Reply-To: <20180618110502.cb5s24srp4frahm6@ninjato>
On 2018-06-18 13:05, Wolfram Sang wrote:
>
>> +static inline void
>> +i2c_lock_segment(struct i2c_adapter *adapter)
>> +{
>> + i2c_lock_bus(adapter, I2C_LOCK_SEGMENT);
>> +}
>> +
>> +static inline int
>> +i2c_trylock_segment(struct i2c_adapter *adapter)
>> +{
>> + return i2c_trylock_bus(adapter, I2C_LOCK_SEGMENT);
>> +}
>> +
>> +static inline void
>> +i2c_unlock_segment(struct i2c_adapter *adapter)
>> +{
>> + i2c_unlock_bus(adapter, I2C_LOCK_SEGMENT);
>> +}
>
> I wonder if i2c_lock_segment() and i2c_lock_root_adapter() are really
> more readable and convenient than i2c_lock_bus() with the flag. I think
> the flags have speaking names, too.
>
> Is that an idea to remove these functions altogether and start using
> i2c_lock_bus()?
That would be fine with me. I don't have a strong opinion and agree that
both are readable enough...
It would make for a reduction of the number of lines so that's nice, but
the macro in drivers/i2c/busses/i2c-gpio.c (patch 11) would not fit in
the current \-width (or whatever you'd call that line of backslashes to
the right in a multi-line macro).
Does anyone have a strong opinion?
Cheers,
Peter
^ permalink raw reply
* Re: [PATCH 00/11] Split i2c_lock_adapter into i2c_lock_root and i2c_lock_segment
From: Wolfram Sang @ 2018-06-18 11:06 UTC (permalink / raw)
To: Peter Rosin
Cc: linux-kernel, Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe,
Arnd Bergmann, Greg Kroah-Hartman, Brian Norris, Gregory Fong,
Florian Fainelli, bcm-kernel-feedback-list, Sekhar Nori,
Kevin Hilman, Haavard Skinnemoen, Kukjin Kim, Krzysztof Kozlowski,
Orson Zhai, Baolin Wang, Chunyan Zhang, Laxman Dewangan,
Thierry Reding
In-Reply-To: <20180615101506.8012-1-peda@axentia.se>
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
> I suggest that Wolfram takes this series through the I2C tree
> and creates an immutable branch for the other subsystems. The
I'd prefer this, too. Are the other subsystem maintainers fine with
that?
I am very positive on the series. I just have one comment which I just
posted. It looks good in general.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH 01/11] i2c: add helpers for locking the I2C segment
From: Wolfram Sang @ 2018-06-18 11:05 UTC (permalink / raw)
To: Peter Rosin
Cc: linux-kernel, Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe,
Arnd Bergmann, Greg Kroah-Hartman, Brian Norris, Gregory Fong,
Florian Fainelli, bcm-kernel-feedback-list, Sekhar Nori,
Kevin Hilman, Haavard Skinnemoen, Kukjin Kim, Krzysztof Kozlowski,
Orson Zhai, Baolin Wang, Chunyan Zhang, Laxman Dewangan,
Thierry Reding
In-Reply-To: <20180615101506.8012-2-peda@axentia.se>
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
> +static inline void
> +i2c_lock_segment(struct i2c_adapter *adapter)
> +{
> + i2c_lock_bus(adapter, I2C_LOCK_SEGMENT);
> +}
> +
> +static inline int
> +i2c_trylock_segment(struct i2c_adapter *adapter)
> +{
> + return i2c_trylock_bus(adapter, I2C_LOCK_SEGMENT);
> +}
> +
> +static inline void
> +i2c_unlock_segment(struct i2c_adapter *adapter)
> +{
> + i2c_unlock_bus(adapter, I2C_LOCK_SEGMENT);
> +}
I wonder if i2c_lock_segment() and i2c_lock_root_adapter() are really
more readable and convenient than i2c_lock_bus() with the flag. I think
the flags have speaking names, too.
Is that an idea to remove these functions altogether and start using
i2c_lock_bus()?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH v3] Input: add bu21029 touch driver
From: Jonas Mark (BT-FIR/ENG1) @ 2018-06-18 9:35 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all@01.org, Dmitry Torokhov, Rob Herring, Mark Rutland,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, hs@denx.de,
Jonas Mark (BT-FIR/ENG1), ZHANG Kevin (BT-FIR/ENG1-Zhu),
RUAN Tingquan (BT-FIR/ENG1-Zhu), zhuyi882004@126.com
Hi kbuild test robot,
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on v4.17-rc4]
> [also build test WARNING on next-20180615]
> [cannot apply to input/next]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Mark-Jonas/Input-add-bu21029-
> touch-driver/20180512-091305
> reproduce:
> # apt-get install sparse
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
> >> drivers/input/touchscreen/bu21029_ts.c:293:13: sparse: restricted __be16
> degrades to integer
[..]
> 288 if (error < 0) {
> 289 dev_err(&i2c->dev, "failed to read HW ID\n");
> 290 goto out;
> 291 }
> 292
> > 293 if (cpu_to_be16(hwid) != SUPPORTED_HWID) {
> 294 dev_err(&i2c->dev, "unsupported HW ID 0x%x\n", hwid);
> 295 error = -ENODEV;
> 296 goto out;
> 297 }
Thank you for your effort. The reported problem was already fixed.
Please have a look at the most recent v5 patch posted on this list.
Greetings,
Mark
Mark Jonas
Building Technologies, Panel Software Fire (BT-FIR/ENG1)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.boschsecurity.com
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster
^ permalink raw reply
* Re: [PATCH v4] platform/x86: touchscreen_dmi: Add info for the ONDA V891W Dual OS tablet
From: Hans de Goede @ 2018-06-18 8:43 UTC (permalink / raw)
To: youling257, linux-kernel; +Cc: platform-driver-x86, linux-input, andy, dvhart
In-Reply-To: <20180617235812.18596-1-youling257@gmail.com>
Hi,
On 18-06-18 01:58, youling257 wrote:
> Add touchscreen info for the ONDA V891W Dual OS tablet
Nitpick: still missing a period '.' at the end, this should be:
Add touchscreen info for the ONDA V891W Dual OS tablet.
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: youling257 <youling257@gmail.com>
As Andy indicated you need to use your real name when submitting
kernel patches, not an internet alias (or a nick).
So you need to re-submit this with something like this:
Signed-off-by: FirstName LastName <youling257@gmail.com>
Regards,
Hans
> ---
> drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
> index 6284946cb0d1..2ad9327c8c0f 100644
> --- a/drivers/platform/x86/touchscreen_dmi.c
> +++ b/drivers/platform/x86/touchscreen_dmi.c
> @@ -221,6 +221,24 @@ static const struct ts_dmi_data onda_v891w_v1_data = {
> .properties = onda_v891w_v1_props,
> };
>
> +static const struct property_entry onda_v891w_v3_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
> + PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
> + PROPERTY_ENTRY_STRING("firmware-name",
> + "gsl3676-onda-v891w-v3.fw"),
> + PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> + PROPERTY_ENTRY_BOOL("silead,home-button"),
> + { }
> +};
> +
> +static const struct ts_dmi_data onda_v891w_v3_data = {
> + .acpi_name = "MSSL1680:00",
> + .properties = onda_v891w_v3_props,
> +};
> +
> static const struct property_entry pipo_w2s_props[] = {
> PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
> PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
> @@ -481,6 +499,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
> DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
> },
> },
> + {
> + /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
> + .driver_data = (void *)&onda_v891w_v3_data,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
> + DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
> + },
> + },
> {
> /* Pipo W2S */
> .driver_data = (void *)&pipo_w2s_data,
>
^ permalink raw reply
* Re: [PATCH v3 24/27] devicetree: fix a series of wrong file references
From: Alexandre Torgue @ 2018-06-18 7:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Linux Doc Mailing List
Cc: Mark Rutland, linux-input, alsa-devel, Binghui Wang,
Maxime Coquelin, Jonathan Corbet, Maxime Ripard, Liam Girdwood,
Mark Brown, Dmitry Torokhov, linux-pci, linux-kernel,
Mauro Carvalho Chehab, Chen-Yu Tsai, Rob Herring,
linux-arm-kernel, Zhou Wang, Xiaowei Song, Bjorn Helgaas,
Lee Jones, devicetree
In-Reply-To: <bce1b59268ac2d659fd7cb37f89285ef2acc8316.1528990947.git.mchehab+samsung@kernel.org>
On 06/14/2018 06:09 PM, Mauro Carvalho Chehab wrote:
> As files got renamed, their references broke.
>
> Manually fix a series of broken refs at the DT bindings.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
For stm32 part:
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Thanks
Alex
> .../devicetree/bindings/input/rmi4/rmi_2d_sensor.txt | 2 +-
> Documentation/devicetree/bindings/mfd/sun6i-prcm.txt | 2 +-
> .../devicetree/bindings/pci/hisilicon-pcie.txt | 2 +-
> Documentation/devicetree/bindings/pci/kirin-pcie.txt | 2 +-
> .../devicetree/bindings/pci/pci-keystone.txt | 4 ++--
> .../devicetree/bindings/sound/st,stm32-i2s.txt | 2 +-
> .../devicetree/bindings/sound/st,stm32-sai.txt | 2 +-
> MAINTAINERS | 12 ++++++------
> 8 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt b/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt
> index f2c30c8b725d..9afffbdf6e28 100644
> --- a/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt
> +++ b/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt
> @@ -12,7 +12,7 @@ Additional documentation for F11 can be found at:
> http://www.synaptics.com/sites/default/files/511-000136-01-Rev-E-RMI4-Interfacing-Guide.pdf
>
> Optional Touch Properties:
> -Description in Documentation/devicetree/bindings/input/touch
> +Description in Documentation/devicetree/bindings/input/touchscreen
> - touchscreen-inverted-x
> - touchscreen-inverted-y
> - touchscreen-swapped-x-y
> diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> index 4d21ffdb0fc1..daa091c2e67b 100644
> --- a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> +++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> @@ -8,7 +8,7 @@ Required properties:
> - reg: The PRCM registers range
>
> The prcm node may contain several subdevices definitions:
> - - see Documentation/devicetree/clk/sunxi.txt for clock devices
> + - see Documentation/devicetree/bindings/clock/sunxi.txt for clock devices
> - see Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt for reset
> controller devices
>
> diff --git a/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
> index 7bf9df047a1e..0dcb87d6554f 100644
> --- a/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
> +++ b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
> @@ -3,7 +3,7 @@ HiSilicon Hip05 and Hip06 PCIe host bridge DT description
> HiSilicon PCIe host controller is based on the Synopsys DesignWare PCI core.
> It shares common functions with the PCIe DesignWare core driver and inherits
> common properties defined in
> -Documentation/devicetree/bindings/pci/designware-pci.txt.
> +Documentation/devicetree/bindings/pci/designware-pcie.txt.
>
> Additional properties are described here:
>
> diff --git a/Documentation/devicetree/bindings/pci/kirin-pcie.txt b/Documentation/devicetree/bindings/pci/kirin-pcie.txt
> index 6e217c63123d..6bbe43818ad5 100644
> --- a/Documentation/devicetree/bindings/pci/kirin-pcie.txt
> +++ b/Documentation/devicetree/bindings/pci/kirin-pcie.txt
> @@ -3,7 +3,7 @@ HiSilicon Kirin SoCs PCIe host DT description
> Kirin PCIe host controller is based on the Synopsys DesignWare PCI core.
> It shares common functions with the PCIe DesignWare core driver and
> inherits common properties defined in
> -Documentation/devicetree/bindings/pci/designware-pci.txt.
> +Documentation/devicetree/bindings/pci/designware-pcie.txt.
>
> Additional properties are described here:
>
> diff --git a/Documentation/devicetree/bindings/pci/pci-keystone.txt b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> index 7e05487544ed..3d4a209b0fd0 100644
> --- a/Documentation/devicetree/bindings/pci/pci-keystone.txt
> +++ b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> @@ -3,9 +3,9 @@ TI Keystone PCIe interface
> Keystone PCI host Controller is based on the Synopsys DesignWare PCI
> hardware version 3.65. It shares common functions with the PCIe DesignWare
> core driver and inherits common properties defined in
> -Documentation/devicetree/bindings/pci/designware-pci.txt
> +Documentation/devicetree/bindings/pci/designware-pcie.txt
>
> -Please refer to Documentation/devicetree/bindings/pci/designware-pci.txt
> +Please refer to Documentation/devicetree/bindings/pci/designware-pcie.txt
> for the details of DesignWare DT bindings. Additional properties are
> described here as well as properties that are not applicable.
>
> diff --git a/Documentation/devicetree/bindings/sound/st,stm32-i2s.txt b/Documentation/devicetree/bindings/sound/st,stm32-i2s.txt
> index 4bda52042402..58c341300552 100644
> --- a/Documentation/devicetree/bindings/sound/st,stm32-i2s.txt
> +++ b/Documentation/devicetree/bindings/sound/st,stm32-i2s.txt
> @@ -18,7 +18,7 @@ Required properties:
> See Documentation/devicetree/bindings/dma/stm32-dma.txt.
> - dma-names: Identifier for each DMA request line. Must be "tx" and "rx".
> - pinctrl-names: should contain only value "default"
> - - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt
> + - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
>
> Optional properties:
> - resets: Reference to a reset controller asserting the reset controller
> diff --git a/Documentation/devicetree/bindings/sound/st,stm32-sai.txt b/Documentation/devicetree/bindings/sound/st,stm32-sai.txt
> index f301cdf0b7e6..3a3fc506e43a 100644
> --- a/Documentation/devicetree/bindings/sound/st,stm32-sai.txt
> +++ b/Documentation/devicetree/bindings/sound/st,stm32-sai.txt
> @@ -37,7 +37,7 @@ SAI subnodes required properties:
> "tx": if sai sub-block is configured as playback DAI
> "rx": if sai sub-block is configured as capture DAI
> - pinctrl-names: should contain only value "default"
> - - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt
> + - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
>
> SAI subnodes Optional properties:
> - st,sync: specify synchronization mode.
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 67641f5bb373..69c9e9924902 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6965,7 +6965,7 @@ IIO MULTIPLEXER
> M: Peter Rosin <peda@axentia.se>
> L: linux-iio@vger.kernel.org
> S: Maintained
> -F: Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
> +F: Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt
> F: drivers/iio/multiplexer/iio-mux.c
>
> IIO SUBSYSTEM AND DRIVERS
> @@ -9695,7 +9695,7 @@ MXSFB DRM DRIVER
> M: Marek Vasut <marex@denx.de>
> S: Supported
> F: drivers/gpu/drm/mxsfb/
> -F: Documentation/devicetree/bindings/display/mxsfb-drm.txt
> +F: Documentation/devicetree/bindings/display/mxsfb.txt
>
> MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
> M: Chris Lee <christopher.lee@cspi.com>
> @@ -10884,7 +10884,7 @@ M: Will Deacon <will.deacon@arm.com>
> L: linux-pci@vger.kernel.org
> L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
> S: Maintained
> -F: Documentation/devicetree/bindings/pci/controller-generic-pci.txt
> +F: Documentation/devicetree/bindings/pci/host-generic-pci.txt
> F: drivers/pci/controller/pci-host-common.c
> F: drivers/pci/controller/pci-host-generic.c
>
> @@ -11065,7 +11065,7 @@ M: Xiaowei Song <songxiaowei@hisilicon.com>
> M: Binghui Wang <wangbinghui@hisilicon.com>
> L: linux-pci@vger.kernel.org
> S: Maintained
> -F: Documentation/devicetree/bindings/pci/pcie-kirin.txt
> +F: Documentation/devicetree/bindings/pci/kirin-pcie.txt
> F: drivers/pci/controller/dwc/pcie-kirin.c
>
> PCIE DRIVER FOR HISILICON STB
> @@ -12456,7 +12456,7 @@ L: linux-crypto@vger.kernel.org
> L: linux-samsung-soc@vger.kernel.org
> S: Maintained
> F: drivers/crypto/exynos-rng.c
> -F: Documentation/devicetree/bindings/crypto/samsung,exynos-rng4.txt
> +F: Documentation/devicetree/bindings/rng/samsung,exynos4-rng.txt
>
> SAMSUNG EXYNOS TRUE RANDOM NUMBER GENERATOR (TRNG) DRIVER
> M: Łukasz Stelmach <l.stelmach@samsung.com>
> @@ -13570,7 +13570,7 @@ F: drivers/*/stm32-*timer*
> F: drivers/pwm/pwm-stm32*
> F: include/linux/*/stm32-*tim*
> F: Documentation/ABI/testing/*timer-stm32
> -F: Documentation/devicetree/bindings/*/stm32-*timer
> +F: Documentation/devicetree/bindings/*/stm32-*timer*
> F: Documentation/devicetree/bindings/pwm/pwm-stm32*
>
> STMMAC ETHERNET DRIVER
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] dt-bindings: Fix unbalanced quotation marks
From: Krzysztof Kozlowski @ 2018-06-18 7:06 UTC (permalink / raw)
To: Jonathan Neuschäfer
Cc: devicetree, Kukjin Kim, Rob Herring, Mark Rutland, Linus Walleij,
Dmitry Torokhov, Thomas Gleixner, Jason Cooper, Marc Zyngier,
Thierry Reding, Jonathan Hunter, Maxime Coquelin,
Alexandre Torgue, Hauke Mehrtens, Rafał Miłecki,
Ralf Baechle, Paul Burton, James Hogan, Madalin Bucur
In-Reply-To: <20180617143127.11421-1-j.neuschaefer@gmx.net>
On Sun, Jun 17, 2018 at 4:31 PM, Jonathan Neuschäfer
<j.neuschaefer@gmx.net> wrote:
> Multiple binding documents have various forms of unbalanced quotation
> marks. Fix them.
>
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
>
> Should I split this patch so that different parts can go through different trees?
> ---
> .../devicetree/bindings/arm/samsung/samsung-boards.txt | 2 +-
> .../devicetree/bindings/gpio/nintendo,hollywood-gpio.txt | 2 +-
> Documentation/devicetree/bindings/input/touchscreen/hideep.txt | 2 +-
> .../bindings/interrupt-controller/nvidia,tegra20-ictlr.txt | 2 +-
> .../devicetree/bindings/interrupt-controller/st,stm32-exti.txt | 2 +-
> Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +-
> Documentation/devicetree/bindings/net/fsl-fman.txt | 2 +-
> Documentation/devicetree/bindings/power/power_domain.txt | 2 +-
> Documentation/devicetree/bindings/regulator/tps65090.txt | 2 +-
> Documentation/devicetree/bindings/reset/st,sti-softreset.txt | 2 +-
> Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt | 2 +-
> Documentation/devicetree/bindings/sound/qcom,apq8096.txt | 2 +-
> 12 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
> index bdadc3da9556..6970f30a3770 100644
> --- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
> +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
> @@ -66,7 +66,7 @@ Required root node properties:
> - "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
> Octa board.
> - "insignal,origen" - for Exynos4210-based Insignal Origen board.
> - - "insignal,origen4412 - for Exynos4412-based Insignal Origen board.
> + - "insignal,origen4412" - for Exynos4412-based Insignal Origen board.
>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v4 23/26] devicetree: fix a series of wrong file references
From: Lee Jones @ 2018-06-18 5:49 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Linux Doc Mailing List, Jonathan Corbet, Mauro Carvalho Chehab,
linux-kernel, Dmitry Torokhov, Rob Herring, Mark Rutland,
Maxime Ripard, Chen-Yu Tsai, Zhou Wang, Bjorn Helgaas,
Xiaowei Song, Binghui Wang, Liam Girdwood, Mark Brown,
Maxime Coquelin, Alexandre Torgue, linux-input, devicetree,
linux-arm-kernel
In-Reply-To: <266e5f874b36aa83f3327879d85921fab52d5461.1529079120.git.mchehab+samsung@kernel.org>
On Fri, 15 Jun 2018, Mauro Carvalho Chehab wrote:
> As files got renamed, their references broke.
>
> Manually fix a series of broken refs at the DT bindings.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
> .../devicetree/bindings/input/rmi4/rmi_2d_sensor.txt | 2 +-
> Documentation/devicetree/bindings/mfd/sun6i-prcm.txt | 2 +-
Acked-by: Lee Jones <lee.jones@linaro.org>
> .../devicetree/bindings/pci/hisilicon-pcie.txt | 2 +-
> Documentation/devicetree/bindings/pci/kirin-pcie.txt | 2 +-
> .../devicetree/bindings/pci/pci-keystone.txt | 4 ++--
> .../devicetree/bindings/sound/st,stm32-i2s.txt | 2 +-
> .../devicetree/bindings/sound/st,stm32-sai.txt | 2 +-
> MAINTAINERS | 12 ++++++------
> 8 files changed, 14 insertions(+), 14 deletions(-)
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH v4] platform/x86: touchscreen_dmi: Add info for the ONDA V891W Dual OS tablet
From: youling257 @ 2018-06-17 23:58 UTC (permalink / raw)
To: linux-kernel
Cc: platform-driver-x86, linux-input, andy, dvhart, hdegoede,
youling257
Add touchscreen info for the ONDA V891W Dual OS tablet
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: youling257 <youling257@gmail.com>
---
drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index 6284946cb0d1..2ad9327c8c0f 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -221,6 +221,24 @@ static const struct ts_dmi_data onda_v891w_v1_data = {
.properties = onda_v891w_v1_props,
};
+static const struct property_entry onda_v891w_v3_props[] = {
+ PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
+ PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+ PROPERTY_ENTRY_STRING("firmware-name",
+ "gsl3676-onda-v891w-v3.fw"),
+ PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+ PROPERTY_ENTRY_BOOL("silead,home-button"),
+ { }
+};
+
+static const struct ts_dmi_data onda_v891w_v3_data = {
+ .acpi_name = "MSSL1680:00",
+ .properties = onda_v891w_v3_props,
+};
+
static const struct property_entry pipo_w2s_props[] = {
PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
@@ -481,6 +499,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
},
},
+ {
+ /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
+ .driver_data = (void *)&onda_v891w_v3_data,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
+ },
+ },
{
/* Pipo W2S */
.driver_data = (void *)&pipo_w2s_data,
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v3] Input: add bu21029 touch driver
From: kbuild test robot @ 2018-06-17 19:19 UTC (permalink / raw)
Cc: kbuild-all, Dmitry Torokhov, Rob Herring, Mark Rutland,
linux-input, devicetree, linux-kernel, hs, Zhu Yi, Mark Jonas
In-Reply-To: <1526048528-3613-1-git-send-email-mark.jonas@de.bosch.com>
Hi Zhu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v4.17-rc4]
[also build test WARNING on next-20180615]
[cannot apply to input/next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Mark-Jonas/Input-add-bu21029-touch-driver/20180512-091305
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/input/touchscreen/bu21029_ts.c:293:13: sparse: restricted __be16 degrades to integer
vim +293 drivers/input/touchscreen/bu21029_ts.c
262
263 static int bu21029_start_chip(struct input_dev *dev)
264 {
265 struct bu21029_ts_data *bu21029 = input_get_drvdata(dev);
266 struct i2c_client *i2c = bu21029->client;
267 struct {
268 u8 reg;
269 u8 value;
270 } init_table[] = {
271 {BU21029_CFR0_REG, CFR0_VALUE},
272 {BU21029_CFR1_REG, CFR1_VALUE},
273 {BU21029_CFR2_REG, CFR2_VALUE},
274 {BU21029_CFR3_REG, CFR3_VALUE},
275 {BU21029_LDO_REG, LDO_VALUE}
276 };
277 int error, i;
278 u16 hwid;
279
280 /* take chip out of reset */
281 gpiod_set_value_cansleep(bu21029->reset_gpios, 0);
282 mdelay(START_DELAY_MS);
283
284 error = i2c_smbus_read_i2c_block_data(i2c,
285 BU21029_HWID_REG,
286 2,
287 (u8 *)&hwid);
288 if (error < 0) {
289 dev_err(&i2c->dev, "failed to read HW ID\n");
290 goto out;
291 }
292
> 293 if (cpu_to_be16(hwid) != SUPPORTED_HWID) {
294 dev_err(&i2c->dev, "unsupported HW ID 0x%x\n", hwid);
295 error = -ENODEV;
296 goto out;
297 }
298
299 for (i = 0; i < ARRAY_SIZE(init_table); ++i) {
300 error = i2c_smbus_write_byte_data(i2c,
301 init_table[i].reg,
302 init_table[i].value);
303 if (error < 0) {
304 dev_err(&i2c->dev,
305 "failed to write 0x%x to register 0x%x\n",
306 init_table[i].value,
307 init_table[i].reg);
308 goto out;
309 }
310 }
311
312 error = i2c_smbus_write_byte(i2c, BU21029_AUTOSCAN);
313 if (error < 0) {
314 dev_err(&i2c->dev, "failed to start autoscan\n");
315 goto out;
316 }
317
318 enable_irq(bu21029->client->irq);
319 return 0;
320
321 out:
322 bu21029_stop_chip(dev);
323 return error;
324 }
325
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply
* Re: [PATCH v3] platform/x86: touchscreen_dmi: Add info for the ONDA V891W Dual OS
From: Andy Shevchenko @ 2018-06-17 16:47 UTC (permalink / raw)
To: youling 257
Cc: Linux Kernel Mailing List, Platform Driver, linux-input,
Andy Shevchenko, Darren Hart, Hans de Goede
In-Reply-To: <20180617140326.12854-1-youling257@gmail.com>
Thanks for the patch, my comments below.
On Sun, Jun 17, 2018 at 5:03 PM youling257 <youling257@gmail.com> wrote:
>
> Add touchscreen info for the ONDA V891W Dual OS
It would be nice to end sentences with period.
>
> Signed-off-by: youling257 <youling257@gmail.com>
There is still couple of things that prevents me to apply:
- please use your real name in SoB
- you forget to add Hans' tag
> ---
> drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
> index 6284946cb0d1..2ad9327c8c0f 100644
> --- a/drivers/platform/x86/touchscreen_dmi.c
> +++ b/drivers/platform/x86/touchscreen_dmi.c
> @@ -221,6 +221,24 @@ static const struct ts_dmi_data onda_v891w_v1_data = {
> .properties = onda_v891w_v1_props,
> };
>
> +static const struct property_entry onda_v891w_v3_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
> + PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
> + PROPERTY_ENTRY_STRING("firmware-name",
> + "gsl3676-onda-v891w-v3.fw"),
> + PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> + PROPERTY_ENTRY_BOOL("silead,home-button"),
> + { }
> +};
> +
> +static const struct ts_dmi_data onda_v891w_v3_data = {
> + .acpi_name = "MSSL1680:00",
> + .properties = onda_v891w_v3_props,
> +};
> +
> static const struct property_entry pipo_w2s_props[] = {
> PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
> PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
> @@ -481,6 +499,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
> DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
> },
> },
> + {
> + /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
> + .driver_data = (void *)&onda_v891w_v3_data,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
> + DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
> + },
> + },
> {
> /* Pipo W2S */
> .driver_data = (void *)&pipo_w2s_data,
> --
> 2.17.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* [PATCH] dt-bindings: Fix unbalanced quotation marks
From: Jonathan Neuschäfer @ 2018-06-17 14:31 UTC (permalink / raw)
To: devicetree
Cc: Mark Rutland, linux-mips, Ulf Hansson, Madalin Bucur, James Hogan,
Linus Walleij, alsa-devel, linux-kernel, Thierry Reding,
Alexandre Torgue, linux-samsung-soc, Kevin Hilman,
Rafał Miłecki, Krzysztof Kozlowski, Jonathan Hunter,
Kukjin Kim, linux-input, Philipp Zabel, Jason Cooper, linux-pm,
Marc Zyngier, Hauke Mehrtens, Jonathan Neuschäfer,
linux-gpio
Multiple binding documents have various forms of unbalanced quotation
marks. Fix them.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
Should I split this patch so that different parts can go through different trees?
---
.../devicetree/bindings/arm/samsung/samsung-boards.txt | 2 +-
.../devicetree/bindings/gpio/nintendo,hollywood-gpio.txt | 2 +-
Documentation/devicetree/bindings/input/touchscreen/hideep.txt | 2 +-
.../bindings/interrupt-controller/nvidia,tegra20-ictlr.txt | 2 +-
.../devicetree/bindings/interrupt-controller/st,stm32-exti.txt | 2 +-
Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +-
Documentation/devicetree/bindings/net/fsl-fman.txt | 2 +-
Documentation/devicetree/bindings/power/power_domain.txt | 2 +-
Documentation/devicetree/bindings/regulator/tps65090.txt | 2 +-
Documentation/devicetree/bindings/reset/st,sti-softreset.txt | 2 +-
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt | 2 +-
Documentation/devicetree/bindings/sound/qcom,apq8096.txt | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
index bdadc3da9556..6970f30a3770 100644
--- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
@@ -66,7 +66,7 @@ Required root node properties:
- "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
Octa board.
- "insignal,origen" - for Exynos4210-based Insignal Origen board.
- - "insignal,origen4412 - for Exynos4412-based Insignal Origen board.
+ - "insignal,origen4412" - for Exynos4412-based Insignal Origen board.
Optional nodes:
diff --git a/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt b/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt
index 20fc72d9e61e..45a61b462287 100644
--- a/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt
@@ -1,7 +1,7 @@
Nintendo Wii (Hollywood) GPIO controller
Required properties:
-- compatible: "nintendo,hollywood-gpio
+- compatible: "nintendo,hollywood-gpio"
- reg: Physical base address and length of the controller's registers.
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells: Should be <2>. The first cell is the pin number and the
diff --git a/Documentation/devicetree/bindings/input/touchscreen/hideep.txt b/Documentation/devicetree/bindings/input/touchscreen/hideep.txt
index 121d9b7c79a2..1063c30d53f7 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/hideep.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/hideep.txt
@@ -32,7 +32,7 @@ i2c@00000000 {
reg = <0x6c>;
interrupt-parent = <&gpx1>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
- vdd-supply = <&ldo15_reg>";
+ vdd-supply = <&ldo15_reg>;
vid-supply = <&ldo18_reg>;
reset-gpios = <&gpx1 5 0>;
touchscreen-size-x = <1080>;
diff --git a/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt b/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt
index 1099fe0788fa..f246ccbf8838 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra20-ictlr.txt
@@ -15,7 +15,7 @@ Required properties:
include "nvidia,tegra30-ictlr".
- reg : Specifies base physical address and size of the registers.
Each controller must be described separately (Tegra20 has 4 of them,
- whereas Tegra30 and later have 5"
+ whereas Tegra30 and later have 5).
- interrupt-controller : Identifies the node as an interrupt controller.
- #interrupt-cells : Specifies the number of cells needed to encode an
interrupt source. The value must be 3.
diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt b/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt
index 136bd612bd83..6a36bf66d932 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt
@@ -12,7 +12,7 @@ Required properties:
specifier, shall be 2
- interrupts: interrupts references to primary interrupt controller
(only needed for exti controller with multiple exti under
- same parent interrupt: st,stm32-exti and st,stm32h7-exti")
+ same parent interrupt: st,stm32-exti and st,stm32h7-exti)
Example:
diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.txt b/Documentation/devicetree/bindings/mips/brcm/soc.txt
index 356c29789cf5..3a66d3c483e1 100644
--- a/Documentation/devicetree/bindings/mips/brcm/soc.txt
+++ b/Documentation/devicetree/bindings/mips/brcm/soc.txt
@@ -152,7 +152,7 @@ Required properties:
- compatible : should contain one of:
"brcm,bcm7425-timers"
"brcm,bcm7429-timers"
- "brcm,bcm7435-timers and
+ "brcm,bcm7435-timers" and
"brcm,brcmstb-timers"
- reg : the timers register range
- interrupts : the interrupt line for this timer block
diff --git a/Documentation/devicetree/bindings/net/fsl-fman.txt b/Documentation/devicetree/bindings/net/fsl-fman.txt
index df873d1f3b7c..f8c33890bc29 100644
--- a/Documentation/devicetree/bindings/net/fsl-fman.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fman.txt
@@ -238,7 +238,7 @@ PROPERTIES
Must include one of the following:
- "fsl,fman-dtsec" for dTSEC MAC
- "fsl,fman-xgec" for XGEC MAC
- - "fsl,fman-memac for mEMAC MAC
+ - "fsl,fman-memac" for mEMAC MAC
- cell-index
Usage: required
diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt
index 9b387f861aed..7dec508987c7 100644
--- a/Documentation/devicetree/bindings/power/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/power_domain.txt
@@ -133,7 +133,7 @@ located inside a PM domain with index 0 of a power controller represented by a
node with the label "power".
In the second example the consumer device are partitioned across two PM domains,
the first with index 0 and the second with index 1, of a power controller that
-is represented by a node with the label "power.
+is represented by a node with the label "power".
Optional properties:
- required-opps: This contains phandle to an OPP node in another device's OPP
diff --git a/Documentation/devicetree/bindings/regulator/tps65090.txt b/Documentation/devicetree/bindings/regulator/tps65090.txt
index ca69f5e3040c..ae326f263597 100644
--- a/Documentation/devicetree/bindings/regulator/tps65090.txt
+++ b/Documentation/devicetree/bindings/regulator/tps65090.txt
@@ -16,7 +16,7 @@ Required properties:
Optional properties:
- ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
If DCDCs are externally controlled then this property should be there.
-- "dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
+- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
If DCDCs are externally controlled and if it is from GPIO then GPIO
number should be provided. If it is externally controlled and no GPIO
entry then driver will just configure this rails as external control
diff --git a/Documentation/devicetree/bindings/reset/st,sti-softreset.txt b/Documentation/devicetree/bindings/reset/st,sti-softreset.txt
index a21658f18fe6..3661e6153a92 100644
--- a/Documentation/devicetree/bindings/reset/st,sti-softreset.txt
+++ b/Documentation/devicetree/bindings/reset/st,sti-softreset.txt
@@ -15,7 +15,7 @@ Please refer to reset.txt in this directory for common reset
controller binding usage.
Required properties:
-- compatible: Should be st,stih407-softreset";
+- compatible: Should be "st,stih407-softreset";
- #reset-cells: 1, see below
example:
diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
index 6a4aadc4ce06..84b28dbe9f15 100644
--- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
@@ -30,7 +30,7 @@ Required properties:
Board connectors:
* Headset Mic
- * Secondary Mic",
+ * Secondary Mic
* DMIC
* Ext Spk
diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
index aa54e49fc8a2..c7600a93ab39 100644
--- a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
@@ -35,7 +35,7 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio.
"Digital Mic3"
Audio pins and MicBias on WCD9335 Codec:
- "MIC_BIAS1
+ "MIC_BIAS1"
"MIC_BIAS2"
"MIC_BIAS3"
"MIC_BIAS4"
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH v3] platform/x86: touchscreen_dmi: Add info for the ONDA V891W Dual OS
From: youling257 @ 2018-06-17 14:03 UTC (permalink / raw)
To: linux-kernel
Cc: platform-driver-x86, linux-input, andy, dvhart, hdegoede,
youling257
Add touchscreen info for the ONDA V891W Dual OS
Signed-off-by: youling257 <youling257@gmail.com>
---
drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index 6284946cb0d1..2ad9327c8c0f 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -221,6 +221,24 @@ static const struct ts_dmi_data onda_v891w_v1_data = {
.properties = onda_v891w_v1_props,
};
+static const struct property_entry onda_v891w_v3_props[] = {
+ PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
+ PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+ PROPERTY_ENTRY_STRING("firmware-name",
+ "gsl3676-onda-v891w-v3.fw"),
+ PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+ PROPERTY_ENTRY_BOOL("silead,home-button"),
+ { }
+};
+
+static const struct ts_dmi_data onda_v891w_v3_data = {
+ .acpi_name = "MSSL1680:00",
+ .properties = onda_v891w_v3_props,
+};
+
static const struct property_entry pipo_w2s_props[] = {
PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
@@ -481,6 +499,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
},
},
+ {
+ /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
+ .driver_data = (void *)&onda_v891w_v3_data,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
+ },
+ },
{
/* Pipo W2S */
.driver_data = (void *)&pipo_w2s_data,
--
2.17.1
^ permalink raw reply related
* Re: [PATCH V2] platform/x86: touchscreen_dmi: Add info for ONDA V891W Dual OS
From: Hans de Goede @ 2018-06-17 13:33 UTC (permalink / raw)
To: youling257, linux-kernel; +Cc: platform-driver-x86, linux-input, andy, dvhart
In-Reply-To: <20180617131216.6604-1-youling257@gmail.com>
Hi,
Thanks.
On 17-06-18 15:12, youling257 wrote:
Some commit message here would be good.
> Signed-off-by: youling257 <youling257@gmail.com>
Otherwise looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
> index 6284946cb0d1..2ad9327c8c0f 100644
> --- a/drivers/platform/x86/touchscreen_dmi.c
> +++ b/drivers/platform/x86/touchscreen_dmi.c
> @@ -221,6 +221,24 @@ static const struct ts_dmi_data onda_v891w_v1_data = {
> .properties = onda_v891w_v1_props,
> };
>
> +static const struct property_entry onda_v891w_v3_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
> + PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
> + PROPERTY_ENTRY_STRING("firmware-name",
> + "gsl3676-onda-v891w-v3.fw"),
> + PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> + PROPERTY_ENTRY_BOOL("silead,home-button"),
> + { }
> +};
> +
> +static const struct ts_dmi_data onda_v891w_v3_data = {
> + .acpi_name = "MSSL1680:00",
> + .properties = onda_v891w_v3_props,
> +};
> +
> static const struct property_entry pipo_w2s_props[] = {
> PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
> PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
> @@ -481,6 +499,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
> DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
> },
> },
> + {
> + /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
> + .driver_data = (void *)&onda_v891w_v3_data,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
> + DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
> + },
> + },
> {
> /* Pipo W2S */
> .driver_data = (void *)&pipo_w2s_data,
>
^ permalink raw reply
* [PATCH V2] platform/x86: touchscreen_dmi: Add info for ONDA V891W Dual OS
From: youling257 @ 2018-06-17 13:12 UTC (permalink / raw)
To: linux-kernel
Cc: platform-driver-x86, linux-input, andy, dvhart, hdegoede,
youling257
Signed-off-by: youling257 <youling257@gmail.com>
---
drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index 6284946cb0d1..2ad9327c8c0f 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -221,6 +221,24 @@ static const struct ts_dmi_data onda_v891w_v1_data = {
.properties = onda_v891w_v1_props,
};
+static const struct property_entry onda_v891w_v3_props[] = {
+ PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
+ PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+ PROPERTY_ENTRY_STRING("firmware-name",
+ "gsl3676-onda-v891w-v3.fw"),
+ PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+ PROPERTY_ENTRY_BOOL("silead,home-button"),
+ { }
+};
+
+static const struct ts_dmi_data onda_v891w_v3_data = {
+ .acpi_name = "MSSL1680:00",
+ .properties = onda_v891w_v3_props,
+};
+
static const struct property_entry pipo_w2s_props[] = {
PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
@@ -481,6 +499,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
},
},
+ {
+ /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
+ .driver_data = (void *)&onda_v891w_v3_data,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
+ },
+ },
{
/* Pipo W2S */
.driver_data = (void *)&pipo_w2s_data,
--
2.17.1
^ permalink raw reply related
* [PATCH v2] ARM: dts: am437x: make edt-ft5x06 a wakeup source
From: Daniel Mack @ 2018-06-17 11:53 UTC (permalink / raw)
To: tony, dmitry.torokhov, robh+dt, mark.rutland, shawnguo, kernel,
fabio.estevam
Cc: devicetree, Daniel Mack, linux-arm-kernel, linux-input
The touchscreen driver no longer configures the device as wakeup source by
default. A "wakeup-source" property is needed.
Signed-off-by: Daniel Mack <daniel@zonque.org>
---
v1 → v2: amended subject to not mention imx6 anymore
arch/arm/boot/dts/am437x-sk-evm.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index 440351ad0b80..d4be3fd0b6f4 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -610,6 +610,8 @@
touchscreen-size-x = <480>;
touchscreen-size-y = <272>;
+
+ wakeup-source;
};
tlv320aic3106: tlv320aic3106@1b {
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH v1] platform/x86: silead_dmi: Add touchscreen info for the Onda V891w V3 tablet
From: Hans de Goede @ 2018-06-17 11:34 UTC (permalink / raw)
To: youling257, linux-kernel; +Cc: platform-driver-x86, linux-input, andy, dvhart
In-Reply-To: <20180617103736.1162-1-youling257@gmail.com>
Hi,
Thank you for this patch.
Please rebase this patch on top of:
http://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git/shortlog/refs/heads/review-andy
Where the entries have been sorted alphabetically and
the file has been renamed to touchscreen_dmi.c
On 17-06-18 12:37, youling257 wrote:
> Signed-off-by: youling257 <youling257@gmail.com>
> ---
> drivers/platform/x86/silead_dmi.c | 35 +++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/drivers/platform/x86/silead_dmi.c b/drivers/platform/x86/silead_dmi.c
> index 853a7ce4601c..9e61182c8aff 100644
> --- a/drivers/platform/x86/silead_dmi.c
> +++ b/drivers/platform/x86/silead_dmi.c
> @@ -326,6 +326,23 @@ static const struct silead_ts_dmi_data onda_v891w_v1_data = {
> .properties = onda_v891w_v1_props,
> };
>
> +static const struct property_entry onda_v891w_v3_props[] = {
> + PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
> + PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
> + PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
> + PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
> + PROPERTY_ENTRY_STRING("firmware-name", "FW_I89_GSL3676B_19201200_.fw"),
> + PROPERTY_ENTRY_U32("silead,max-fingers", 10),
> + PROPERTY_ENTRY_BOOL("silead,home-button"),
> + { }
> +};
> +
> +static const struct silead_ts_dmi_data onda_v891w_v3_data = {
> + .acpi_name = "MSSL1680:00",
> + .properties = onda_v891w_v3_props,
> +};
> +
> static const struct dmi_system_id silead_ts_dmi_table[] = {
> {
> /* CUBE iwork8 Air */
> @@ -554,6 +571,24 @@ static const struct dmi_system_id silead_ts_dmi_table[] = {
> DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
> },
> },
> + {
> + /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
> + .driver_data = (void *)&onda_v891w_v3_data,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
> + DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
> + },
> + },
This entry is using the V1 BIOS data, so it needs to be dropped. I know
some V3 tablets ship with the V1 BIOS, I plan to add the possibility to
directly select a set of ts_dmi_data from the kernel commandline. This
will also be useful to select the right data for the many rebrands of
various tablets with a Silead touchscreen.
Regards,
Hans
> + {
> + /* ONDA V891w P891WBECV3A02121 32GB */
> + .driver_data = (void *)&onda_v891w_v3_data,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
> + DMI_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
> + },
> + },
> { },
> };
>
>
^ permalink raw reply
* [PATCH v1] platform/x86: silead_dmi: Add touchscreen info for the Onda V891w V3 tablet
From: youling257 @ 2018-06-17 10:37 UTC (permalink / raw)
To: linux-kernel
Cc: platform-driver-x86, linux-input, andy, dvhart, hdegoede,
youling257
Signed-off-by: youling257 <youling257@gmail.com>
---
drivers/platform/x86/silead_dmi.c | 35 +++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/drivers/platform/x86/silead_dmi.c b/drivers/platform/x86/silead_dmi.c
index 853a7ce4601c..9e61182c8aff 100644
--- a/drivers/platform/x86/silead_dmi.c
+++ b/drivers/platform/x86/silead_dmi.c
@@ -326,6 +326,23 @@ static const struct silead_ts_dmi_data onda_v891w_v1_data = {
.properties = onda_v891w_v1_props,
};
+static const struct property_entry onda_v891w_v3_props[] = {
+ PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
+ PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+ PROPERTY_ENTRY_STRING("firmware-name", "FW_I89_GSL3676B_19201200_.fw"),
+ PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+ PROPERTY_ENTRY_BOOL("silead,home-button"),
+ { }
+};
+
+static const struct silead_ts_dmi_data onda_v891w_v3_data = {
+ .acpi_name = "MSSL1680:00",
+ .properties = onda_v891w_v3_props,
+};
+
static const struct dmi_system_id silead_ts_dmi_table[] = {
{
/* CUBE iwork8 Air */
@@ -554,6 +571,24 @@ static const struct dmi_system_id silead_ts_dmi_table[] = {
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
},
},
+ {
+ /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
+ .driver_data = (void *)&onda_v891w_v3_data,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
+ },
+ },
+ {
+ /* ONDA V891w P891WBECV3A02121 32GB */
+ .driver_data = (void *)&onda_v891w_v3_data,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
+ },
+ },
{ },
};
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v2 5/5] Input: evdev - Switch to bitmap_zalloc()
From: Joe Perches @ 2018-06-16 19:16 UTC (permalink / raw)
To: Andy Shevchenko, Yury Norov
Cc: Andy Shevchenko, agk, Mike Snitzer, dm-devel, shli, linux-raid,
Dmitry Torokhov, linux-input, Andrew Morton,
Linux Kernel Mailing List, Mika Westerberg
In-Reply-To: <CAHp75VcxYPCLYq1J8qqjPdgDdQnWDgZKkavmyEWD8GNxcW2mWg@mail.gmail.com>
On Sat, 2018-06-16 at 21:45 +0300, Andy Shevchenko wrote:
> On Sat, Jun 16, 2018 at 12:46 AM Yury Norov <ynorov@caviumnetworks.com> wrote:
> > On Fri, Jun 15, 2018 at 04:20:17PM +0300, Andy Shevchenko wrote:
> > > Switch to bitmap_zalloc() to show clearly what we are allocating.
> > > Besides that it returns pointer of bitmap type instead of opaque void *.
>
>
> > > + mem = bitmap_alloc(maxbit, GFP_KERNEL);
> > > if (!mem)
> > > return -ENOMEM;
> >
> > But in commit message you say you switch to bitmap_zalloc(). IIUC
> > bitmap_alloc() is OK here. But could you please update comment to
> > avoid confusing.
>
> There are two places, one with alloc, another with zalloc.
> I will clarify this in commit message of next version.
>
> > > + mask = bitmap_zalloc(cnt, GFP_KERNEL);
> > > if (!mask)
> > > return -ENOMEM;
> > >
> > > error = bits_from_user(mask, cnt - 1, codes_size, codes, compat);
> >
> > If my understanding of bits_from_user() correct, here you can also use
> > bitmap_alloc(), true?
Also it might be useful to have a separate bitmap_from_user
to alloc and copy.
^ permalink raw reply
* Re: [PATCH v2 4/5] Input: gpio-keys - Switch to bitmap_zalloc()
From: Andy Shevchenko @ 2018-06-16 18:50 UTC (permalink / raw)
To: Yury Norov
Cc: Andy Shevchenko, agk, Mike Snitzer, dm-devel, shli, linux-raid,
Dmitry Torokhov, linux-input, Andrew Morton,
Linux Kernel Mailing List, Mika Westerberg
In-Reply-To: <20180615220610.GB371@yury-thinkpad>
On Sat, Jun 16, 2018 at 1:08 AM Yury Norov <ynorov@caviumnetworks.com> wrote:
>
> On Fri, Jun 15, 2018 at 04:20:16PM +0300, Andy Shevchenko wrote:
> > External Email
> >
> > Switch to bitmap_zalloc() to show clearly what we are allocating.
> > Besides that it returns pointer of bitmap type instead of opaque void *.
>
> Nit. There's no special type for bitmaps, bitmap_zalloc() returns long *.
> Is it less opaque than void *, not sure.
Yes, it enables type checking by compiler, which is good thing.
You can't supply other pointer to this API, like
unsigned char *bar = kmalloc(BITS_PER_LONGS(nbits) * sizeof(unsigned
long), GFP_KERNEL);
...
bitmap_free(bar); //<< compiler will not pass this silently!
Or other way around:
unsigned char *foo = bitmap_alloc(nbits, GFP_KERNEL); //<< wrong types!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v2 5/5] Input: evdev - Switch to bitmap_zalloc()
From: Andy Shevchenko @ 2018-06-16 18:45 UTC (permalink / raw)
To: Yury Norov
Cc: Andy Shevchenko, agk, Mike Snitzer, dm-devel, shli, linux-raid,
Dmitry Torokhov, linux-input, Andrew Morton,
Linux Kernel Mailing List, Mika Westerberg
In-Reply-To: <20180615214231.GA371@yury-thinkpad>
On Sat, Jun 16, 2018 at 12:46 AM Yury Norov <ynorov@caviumnetworks.com> wrote:
> On Fri, Jun 15, 2018 at 04:20:17PM +0300, Andy Shevchenko wrote:
> > Switch to bitmap_zalloc() to show clearly what we are allocating.
> > Besides that it returns pointer of bitmap type instead of opaque void *.
> > + mem = bitmap_alloc(maxbit, GFP_KERNEL);
> > if (!mem)
> > return -ENOMEM;
>
> But in commit message you say you switch to bitmap_zalloc(). IIUC
> bitmap_alloc() is OK here. But could you please update comment to
> avoid confusing.
There are two places, one with alloc, another with zalloc.
I will clarify this in commit message of next version.
> > + mask = bitmap_zalloc(cnt, GFP_KERNEL);
> > if (!mask)
> > return -ENOMEM;
> >
> > error = bits_from_user(mask, cnt - 1, codes_size, codes, compat);
>
> If my understanding of bits_from_user() correct, here you can also use
> bitmap_alloc(), true?
While it might be true, it's a material for separate change.
Original code uses zalloc version.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v2 3/5] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
From: Andy Shevchenko @ 2018-06-16 18:42 UTC (permalink / raw)
To: Yury Norov
Cc: Andy Shevchenko, agk, Mike Snitzer, dm-devel, shli, linux-raid,
Dmitry Torokhov, linux-input, Andrew Morton,
Linux Kernel Mailing List, Mika Westerberg
In-Reply-To: <20180615222346.GC371@yury-thinkpad>
On Sat, Jun 16, 2018 at 1:24 AM Yury Norov <ynorov@caviumnetworks.com> wrote:
> On Fri, Jun 15, 2018 at 04:20:15PM +0300, Andy Shevchenko wrote:
> > A lot of code become ugly because of open coding allocations for bitmaps.
> >
> > Introduce three helpers to allow users be more clear of intention
> > and keep their code neat.
>
> I like the idea. But in following patches you switch to new API only
> couple of drivers.
I have converted much more, indeed.
I published only for couple of drivers as an example. This is I
mentioned in cover letter.
> I think, it worth to switch more, especially core
> users to make new API visible for developers. Brief grepping for
> candidates showse only 17 suspected places:
Yes, but not in this series. Since it covers many subsystems and
drivers the applying that kind of series would take ages. That's why I
have decided to submit for one subsystem only.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v2 3/5] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
From: Yury Norov @ 2018-06-15 22:23 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Alasdair Kergon, Mike Snitzer, dm-devel, Shaohua Li, linux-raid,
Dmitry Torokhov, linux-input, Andrew Morton, linux-kernel,
mika.westerberg
In-Reply-To: <20180615132017.23889-4-andriy.shevchenko@linux.intel.com>
Hi Andy,
On Fri, Jun 15, 2018 at 04:20:15PM +0300, Andy Shevchenko wrote:
> A lot of code become ugly because of open coding allocations for bitmaps.
>
> Introduce three helpers to allow users be more clear of intention
> and keep their code neat.
I like the idea. But in following patches you switch to new API only
couple of drivers. I think, it worth to switch more, especially core
users to make new API visible for developers. Brief grepping for
candidates showse only 17 suspected places:
yury:linux$ git grep BITS_TO_LONGS | grep alloc | grep -v drivers | grep -v arch
kernel/events/uprobes.c:1188: area->bitmap = kzalloc(BITS_TO_LONGS(UINSNS_PER_PAGE) * sizeof(long), GFP_KERNEL);
kernel/sysctl.c:3004: tmp_bitmap = kzalloc(BITS_TO_LONGS(bitmap_len) * sizeof(unsigned long),
lib/genalloc.c:188: BITS_TO_LONGS(nbits) * sizeof(long);
lib/test_printf.c:378: unsigned long *bits = kcalloc(BITS_TO_LONGS(nbits), sizeof(long), GFP_KERNEL);
mm/percpu.c:1109: chunk->alloc_map = memblock_virt_alloc(BITS_TO_LONGS(region_bits) *
mm/percpu.c:1111: chunk->bound_map = memblock_virt_alloc(BITS_TO_LONGS(region_bits + 1) *
mm/percpu.c:1170: chunk->alloc_map = pcpu_mem_zalloc(BITS_TO_LONGS(region_bits) *
mm/percpu.c:1175: chunk->bound_map = pcpu_mem_zalloc(BITS_TO_LONGS(region_bits + 1) *
mm/slub.c:3668: unsigned long *map = kzalloc(BITS_TO_LONGS(page->objects) *
mm/slub.c:4435: unsigned long *map = kmalloc(BITS_TO_LONGS(oo_objects(s->max)) *
mm/slub.c:4596: unsigned long *map = kmalloc(BITS_TO_LONGS(oo_objects(s->max)) *
mm/swapfile.c:3219: frontswap_map = kvzalloc(BITS_TO_LONGS(maxpages) * sizeof(long),
net/bridge/br_if.c:328: inuse = kcalloc(BITS_TO_LONGS(BR_MAX_PORTS), sizeof(unsigned long),
net/bridge/br_vlan.c:836: changed = kcalloc(BITS_TO_LONGS(BR_MAX_PORTS), sizeof(unsigned long),
net/mac80211/mesh_plink.c:465: aid_map = kcalloc(BITS_TO_LONGS(IEEE80211_MAX_AID + 1),
net/sched/cls_u32.c:737: unsigned long *bitmap = kzalloc(BITS_TO_LONGS(NR_U32_NODE) * sizeof(unsigned long),
tools/include/linux/bitmap.h:105: return calloc(1, BITS_TO_LONGS(nbits) * sizeof(unsigned long));
Yury
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> include/linux/bitmap.h | 8 ++++++++
> lib/bitmap.c | 19 +++++++++++++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
> index 1ee46f492267..acf5e8df3504 100644
> --- a/include/linux/bitmap.h
> +++ b/include/linux/bitmap.h
> @@ -104,6 +104,14 @@
> * contain all bit positions from 0 to 'bits' - 1.
> */
>
> +/*
> + * Allocation and deallocation of bitmap.
> + * Provided in lib/bitmap.c to avoid circular dependency.
> + */
> +extern unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags);
> +extern unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags);
> +extern void bitmap_free(const unsigned long *bitmap);
> +
> /*
> * lib/bitmap.c provides these functions:
> */
> diff --git a/lib/bitmap.c b/lib/bitmap.c
> index 33e95cd359a2..09acf2fd6a35 100644
> --- a/lib/bitmap.c
> +++ b/lib/bitmap.c
> @@ -13,6 +13,7 @@
> #include <linux/bitops.h>
> #include <linux/bug.h>
> #include <linux/kernel.h>
> +#include <linux/slab.h>
> #include <linux/string.h>
> #include <linux/uaccess.h>
>
> @@ -1125,6 +1126,24 @@ void bitmap_copy_le(unsigned long *dst, const unsigned long *src, unsigned int n
> EXPORT_SYMBOL(bitmap_copy_le);
> #endif
>
> +unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags)
> +{
> + return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long), flags);
> +}
> +EXPORT_SYMBOL(bitmap_alloc);
> +
> +unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags)
> +{
> + return bitmap_alloc(nbits, flags | __GFP_ZERO);
> +}
> +EXPORT_SYMBOL(bitmap_zalloc);
> +
> +void bitmap_free(const unsigned long *bitmap)
> +{
> + kfree(bitmap);
> +}
> +EXPORT_SYMBOL(bitmap_free);
> +
> #if BITS_PER_LONG == 64
> /**
> * bitmap_from_arr32 - copy the contents of u32 array of bits to bitmap
> --
> 2.17.1
^ permalink raw reply
* Re: [PATCH v2 4/5] Input: gpio-keys - Switch to bitmap_zalloc()
From: Yury Norov @ 2018-06-15 22:06 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Alasdair Kergon, Mike Snitzer, dm-devel, Shaohua Li, linux-raid,
Dmitry Torokhov, linux-input, Andrew Morton, linux-kernel,
mika.westerberg
In-Reply-To: <20180615132017.23889-5-andriy.shevchenko@linux.intel.com>
On Fri, Jun 15, 2018 at 04:20:16PM +0300, Andy Shevchenko wrote:
> External Email
>
> Switch to bitmap_zalloc() to show clearly what we are allocating.
> Besides that it returns pointer of bitmap type instead of opaque void *.
Nit. There's no special type for bitmaps, bitmap_zalloc() returns long *.
Is it less opaque than void *, not sure.
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/input/keyboard/gpio_keys.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
> index 052e37675086..492a971b95b5 100644
> --- a/drivers/input/keyboard/gpio_keys.c
> +++ b/drivers/input/keyboard/gpio_keys.c
> @@ -196,7 +196,7 @@ static ssize_t gpio_keys_attr_show_helper(struct gpio_keys_drvdata *ddata,
> ssize_t ret;
> int i;
>
> - bits = kcalloc(BITS_TO_LONGS(n_events), sizeof(*bits), GFP_KERNEL);
> + bits = bitmap_zalloc(n_events, GFP_KERNEL);
> if (!bits)
> return -ENOMEM;
>
> @@ -216,7 +216,7 @@ static ssize_t gpio_keys_attr_show_helper(struct gpio_keys_drvdata *ddata,
> buf[ret++] = '\n';
> buf[ret] = '\0';
>
> - kfree(bits);
> + bitmap_free(bits);
>
> return ret;
> }
> @@ -240,7 +240,7 @@ static ssize_t gpio_keys_attr_store_helper(struct gpio_keys_drvdata *ddata,
> ssize_t error;
> int i;
>
> - bits = kcalloc(BITS_TO_LONGS(n_events), sizeof(*bits), GFP_KERNEL);
> + bits = bitmap_zalloc(n_events, GFP_KERNEL);
> if (!bits)
> return -ENOMEM;
>
> @@ -284,7 +284,7 @@ static ssize_t gpio_keys_attr_store_helper(struct gpio_keys_drvdata *ddata,
> mutex_unlock(&ddata->disable_lock);
>
> out:
> - kfree(bits);
> + bitmap_free(bits);
> return error;
> }
>
> --
> 2.17.1
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox