Re: [PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-27 Thread Alexandre Belloni
On 27/02/2024 14:23:29-0700, Shuah Khan wrote:
> On 2/27/24 13:32, Alexandre Belloni wrote:
> > Hello,
> > 
> > On 21/02/2024 17:27:18+0800, David Gow wrote:
> > > 'days' is a s64 (from div_s64), and so should use a %lld specifier.
> > > 
> > > This was found by extending KUnit's assertion macros to use gcc's
> > > __printf attribute.
> > > 
> > > Fixes: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add 
> > > tests.")
> > > Signed-off-by: David Gow 
> > 
> > Who do you expect to take this patch?
> > 
> 
> I am going to be applying this series to linux-kselftest kunit next
> in just a bit. Would you like to ack the pacth?

Sure,

Acked-by: Alexandre Belloni 

> 
> thanks,
> -- Shuah
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-27 Thread Alexandre Belloni
Hello,

On 21/02/2024 17:27:18+0800, David Gow wrote:
> 'days' is a s64 (from div_s64), and so should use a %lld specifier.
> 
> This was found by extending KUnit's assertion macros to use gcc's
> __printf attribute.
> 
> Fixes: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add 
> tests.")
> Signed-off-by: David Gow 

Who do you expect to take this patch?

> ---
>  drivers/rtc/lib_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/lib_test.c b/drivers/rtc/lib_test.c
> index d5caf36c56cd..225c859d6da5 100644
> --- a/drivers/rtc/lib_test.c
> +++ b/drivers/rtc/lib_test.c
> @@ -54,7 +54,7 @@ static void rtc_time64_to_tm_test_date_range(struct kunit 
> *test)
>  
>   days = div_s64(secs, 86400);
>  
> - #define FAIL_MSG "%d/%02d/%02d (%2d) : %ld", \
> + #define FAIL_MSG "%d/%02d/%02d (%2d) : %lld", \
>   year, month, mday, yday, days
>  
>   KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, 
> FAIL_MSG);
> -- 
> 2.44.0.rc0.258.g7320e95886-goog
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH v2 2/3] dt-bindings: atmel, hlcdc: convert pwm bindings to json-schema

2024-01-16 Thread Alexandre Belloni
On 16/01/2024 18:03:19+, Conor Dooley wrote:
> On Tue, Jan 16, 2024 at 05:07:59PM +0530, Dharma Balasubiramani wrote:
> > Convert device tree bindings for Atmel's HLCDC PWM controller to YAML
> > format.
> > 
> > Signed-off-by: Dharma Balasubiramani 
> > ---
> > changelog
> > v1 -> v2
> > - Remove the explicit copyrights.
> > - Modify title (not include words like binding/driver).
> > - Modify description actually describing the hardware and not the driver.
> > - Remove pinctrl properties which aren't required.
> > - Drop parent node and it's other sub-device node which are not related 
> > here.
> > ---
> >  .../bindings/pwm/atmel,hlcdc-pwm.yaml | 47 +++
> >  .../bindings/pwm/atmel-hlcdc-pwm.txt  | 29 
> >  2 files changed, 47 insertions(+), 29 deletions(-)
> >  create mode 100644 
> > Documentation/devicetree/bindings/pwm/atmel,hlcdc-pwm.yaml
> >  delete mode 100644 
> > Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/atmel,hlcdc-pwm.yaml 
> > b/Documentation/devicetree/bindings/pwm/atmel,hlcdc-pwm.yaml
> > new file mode 100644
> > index ..751122309fa9
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pwm/atmel,hlcdc-pwm.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> 
> The original file has no license, but was originally written by a
> free-electrons employee, so the relicensing here is fine.
> 

I confirm relicensing is fine, even assigning the copyright to
Microchip (note that Bootlin is legally the same entity as
free-electrons)

> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/pwm/atmel,hlcdc-pwm.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Atmel's HLCDC's PWM controller
> > +
> > +maintainers:
> > +  - Nicolas Ferre 
> > +  - Alexandre Belloni 
> > +  - Claudiu Beznea 
> > +
> > +description: |
> 
> Again, the | is not needed here.
> 
> > +  The LCDC integrates a Pulse Width Modulation (PWM) Controller. This block
> > +  generates the LCD contrast control signal (LCD_PWM) that controls the
> > +  display's contrast by software. LCDC_PWM is an 8-bit PWM signal that can 
> > be
> > +  converted to an analog voltage with a simple passive filter. LCD display
> > +  panels have different backlight specifications in terms of 
> > minimum/maximum
> > +  values for PWM frequency. If the LCDC PWM frequency range does not match 
> > the
> > +  LCD display panel, it is possible to use the standalone PWM Controller to
> > +  drive the backlight.
> > +
> > +properties:
> > +  compatible:
> > +const: atmel,hlcdc-pwm
> > +
> > +  "#pwm-cells":
> > +const: 3
> > +description: |
> > +  This PWM chip uses the default 3 cells bindings defined in pwm.yaml 
> > in
> > +  this directory.
> 
> I would delete this description tbh.
> 
> > +
> > +required:
> > +  - compatible
> > +  - "#pwm-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +pwm: pwm {
> > +  compatible = "atmel,hlcdc-pwm";
> > +  pinctrl-names = "default";
> > +  pinctrl-0 = <_lcd_pwm>;
> > +  #pwm-cells = <3>;
> > +};
> 
> The label here is not used and can be dropped. Otherwise,
> Reviewed-by: Conor Dooley 
> 
> 
> Cheers,
> Conor.
> 
> > diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt 
> > b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
> > deleted file mode 100644
> > index afa501bf7f94..
> > --- a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
> > +++ /dev/null
> > @@ -1,29 +0,0 @@
> > -Device-Tree bindings for Atmel's HLCDC (High-end LCD Controller) PWM driver
> > -
> > -The Atmel HLCDC PWM is subdevice of the HLCDC MFD device.
> > -See ../mfd/atmel-hlcdc.txt for more details.
> > -
> > -Required properties:
> > - - compatible: value should be one of the following:
> > -   "atmel,hlcdc-pwm"
> > - - pinctr-names: the pin control state names. Should contain "default".
> > - - pinctrl-0: should contain the pinctrl states described by pinctrl
> > -   default.
> > - - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells
> > -   bindings defined in pwm.yaml in this directory.
> > -
> > -Example:
> > -
> > -   hlcdc: hlcdc@f003 {
> > -   compatible = "atmel,sama5d3-hlcdc";
> > -   reg = <0xf003 0x2000>;
> > -   clocks = <_clk>, <>, <>;
> > -   clock-names = "periph_clk","sys_clk", "slow_clk";
> > -
> > -   hlcdc_pwm: hlcdc-pwm {
> > -   compatible = "atmel,hlcdc-pwm";
> > -   pinctrl-names = "default";
> > -   pinctrl-0 = <_lcd_pwm>;
> > -   #pwm-cells = <3>;
> > -   };
> > -   };
> > -- 
> > 2.25.1
> > 



-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 06/17] dt-bindings: rtc: s3c-rtc: add specific compatibles for existing SoC

2023-11-08 Thread Alexandre Belloni
On 08/11/2023 11:43:32+0100, Krzysztof Kozlowski wrote:
> Samsung Exynos SoC reuses several devices from older designs, thus
> historically we kept the old (block's) compatible only.  This works fine
> and there is no bug here, however guidelines expressed in
> Documentation/devicetree/bindings/writing-bindings.rst state that:
> 1. Compatibles should be specific.
> 2. We should add new compatibles in case of bugs or features.
> 
> Add compatibles specific to each SoC in front of all old-SoC-like
> compatibles.
> 
> Signed-off-by: Krzysztof Kozlowski 
Acked-by: Alexandre Belloni 

> 
> ---
> 
> I propose to take the patch through Samsung SoC (me). See cover letter
> for explanation.
> ---
>  Documentation/devicetree/bindings/rtc/s3c-rtc.yaml | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml 
> b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> index d51b236939bf..bf4e11d6dffb 100644
> --- a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> @@ -17,6 +17,11 @@ properties:
>- samsung,s3c2416-rtc
>- samsung,s3c2443-rtc
>- samsung,s3c6410-rtc
> +  - items:
> +  - enum:
> +  - samsung,exynos7-rtc
> +  - samsung,exynos850-rtc
> +  - const: samsung,s3c6410-rtc
>    - const: samsung,exynos3250-rtc
>  deprecated: true
>  
> -- 
> 2.34.1
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 5/5] spi: make remove callback a void function

2022-01-26 Thread Alexandre Belloni
On 23/01/2022 18:52:01+0100, Uwe Kleine-König wrote:
> The value returned by an spi driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
> 
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
> 
> Signed-off-by: Uwe Kleine-König 
Acked-by: Alexandre Belloni 

> ---
>  drivers/bus/moxtet.c  |  4 +---
>  drivers/char/tpm/st33zp24/spi.c   |  4 +---
>  drivers/char/tpm/tpm_tis_spi_main.c   |  3 +--
>  drivers/clk/clk-lmk04832.c|  4 +---
>  drivers/gpio/gpio-74x164.c|  4 +---
>  drivers/gpio/gpio-max3191x.c  |  4 +---
>  drivers/gpio/gpio-max7301.c   |  4 +---
>  drivers/gpio/gpio-mc33880.c   |  4 +---
>  drivers/gpio/gpio-pisosr.c|  4 +---
>  drivers/gpu/drm/panel/panel-abt-y030xx067a.c  |  4 +---
>  drivers/gpu/drm/panel/panel-ilitek-ili9322.c  |  4 +---
>  drivers/gpu/drm/panel/panel-ilitek-ili9341.c  |  3 +--
>  drivers/gpu/drm/panel/panel-innolux-ej030na.c |  4 +---
>  drivers/gpu/drm/panel/panel-lg-lb035q02.c |  4 +---
>  drivers/gpu/drm/panel/panel-lg-lg4573.c   |  4 +---
>  drivers/gpu/drm/panel/panel-nec-nl8048hl11.c  |  4 +---
>  drivers/gpu/drm/panel/panel-novatek-nt39016.c |  4 +---
>  drivers/gpu/drm/panel/panel-samsung-db7430.c  |  3 +--
>  drivers/gpu/drm/panel/panel-samsung-ld9040.c  |  4 +---
>  drivers/gpu/drm/panel/panel-samsung-s6d27a1.c |  3 +--
>  drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c |  3 +--
>  drivers/gpu/drm/panel/panel-sitronix-st7789v.c|  4 +---
>  drivers/gpu/drm/panel/panel-sony-acx565akm.c  |  4 +---
>  drivers/gpu/drm/panel/panel-tpo-td028ttec1.c  |  4 +---
>  drivers/gpu/drm/panel/panel-tpo-td043mtea1.c  |  4 +---
>  drivers/gpu/drm/panel/panel-tpo-tpg110.c  |  3 +--
>  drivers/gpu/drm/panel/panel-widechips-ws2401.c|  3 +--
>  drivers/gpu/drm/tiny/hx8357d.c|  4 +---
>  drivers/gpu/drm/tiny/ili9163.c|  4 +---
>  drivers/gpu/drm/tiny/ili9225.c|  4 +---
>  drivers/gpu/drm/tiny/ili9341.c|  4 +---
>  drivers/gpu/drm/tiny/ili9486.c|  4 +---
>  drivers/gpu/drm/tiny/mi0283qt.c   |  4 +---
>  drivers/gpu/drm/tiny/repaper.c|  4 +---
>  drivers/gpu/drm/tiny/st7586.c |  4 +---
>  drivers/gpu/drm/tiny/st7735r.c|  4 +---
>  drivers/hwmon/adcxx.c |  4 +---
>  drivers/hwmon/adt7310.c   |  3 +--
>  drivers/hwmon/max.c   |  3 +--
>  drivers/hwmon/max31722.c  |  4 +---
>  drivers/iio/accel/bma400_spi.c|  4 +---
>  drivers/iio/accel/bmc150-accel-spi.c  |  4 +---
>  drivers/iio/accel/bmi088-accel-spi.c  |  4 +---
>  drivers/iio/accel/kxsd9-spi.c |  4 +---
>  drivers/iio/accel/mma7455_spi.c   |  4 +---
>  drivers/iio/accel/sca3000.c   |  4 +---
>  drivers/iio/adc/ad7266.c  |  4 +---
>  drivers/iio/adc/ltc2496.c |  4 +---
>  drivers/iio/adc/mcp320x.c |  4 +---
>  drivers/iio/adc/mcp3911.c |  4 +---
>  drivers/iio/adc/ti-adc12138.c |  4 +---
>  drivers/iio/adc/ti-ads7950.c  |  4 +---
>  drivers/iio/adc/ti-ads8688.c  |  4 +---
>  drivers/iio/adc/ti-tlc4541.c  |  4 +---
>  drivers/iio/amplifiers/ad8366.c   |  4 +---
>  drivers/iio/common/ssp_sensors/ssp_dev.c  |  4 +---
>  drivers/iio/dac/ad5360.c  |  4 +---
>  drivers/iio/dac/ad5380.c  |  4 +---
>  drivers/iio/dac/ad5446.c  |  4 +---
>  drivers/iio/dac/ad5449.c  |  4 +---
>  drivers/iio/dac/ad5504.c  |  4 +---
>  drivers/iio/dac/ad5592r.c |  4 +---
>  

Re: [PATCH] dt-bindings: Remove "status" from schema examples

2021-07-20 Thread Alexandre Belloni
On 20/07/2021 11:20:25-0600, Rob Herring wrote:
> There's no reason to have "status" properties in examples. "okay" is the
> default, and "disabled" turns off some schema checks ('required'
> specifically).
> 
> Enabling qca,ar71xx causes a warning, so let's fix the node names:
> 
> Documentation/devicetree/bindings/net/qca,ar71xx.example.dt.yaml: phy@3: 
> '#phy-cells' is a required property
> From schema: schemas/phy/phy-provider.yaml
> 
> Cc: Maxime Ripard 
> Cc: Chen-Yu Tsai 
> Cc: Thierry Reding 
> Cc: Sam Ravnborg 
> Cc: Rui Miguel Silva 
> Cc: Laurent Pinchart 
> Cc: Mauro Carvalho Chehab 
> Cc: "David S. Miller" 
> Cc: Jakub Kicinski 
> Cc: Mark Brown 
> Cc: Robert Marko 
> Cc: Philipp Zabel 
> Cc: Alessandro Zummo 
> Cc: Alexandre Belloni 
> Cc: Ramesh Shanmugasundaram 
> Cc: "G. Jaya Kumaran" 
> Cc: Linus Walleij 
> Cc: Oleksij Rempel 
> Cc: ChiYuan Huang 
> Cc: Wei Xu 
> Cc: Dilip Kota 
> Cc: Karol Gugala 
> Cc: Mateusz Holenko 
> Cc: Olivier Moysan 
> Cc: Peter Ujfalusi 
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: net...@vger.kernel.org
> Cc: linux-...@vger.kernel.org
> Cc: alsa-de...@alsa-project.org
> Signed-off-by: Rob Herring 
Acked-by: Alexandre Belloni 

> ---
>  .../display/allwinner,sun8i-a83t-dw-hdmi.yaml |  2 --
>  .../display/panel/boe,tv101wum-nl6.yaml   |  1 -
>  .../bindings/media/nxp,imx7-mipi-csi2.yaml|  2 --
>  .../bindings/media/renesas,drif.yaml  |  1 -
>  .../bindings/net/intel,dwmac-plat.yaml|  2 --
>  .../bindings/net/intel,ixp4xx-ethernet.yaml   |  2 --
>  .../bindings/net/nfc/samsung,s3fwrn5.yaml |  3 ---
>  .../devicetree/bindings/net/qca,ar71xx.yaml   | 25 ---
>  .../regulator/richtek,rt6245-regulator.yaml   |  1 -
>  .../regulator/vqmmc-ipq4019-regulator.yaml|  1 -
>  .../reset/hisilicon,hi3660-reset.yaml |  1 -
>  .../bindings/reset/intel,rcu-gw.yaml  |  1 -
>  .../bindings/rtc/microcrystal,rv3032.yaml |  1 -
>  .../soc/litex/litex,soc-controller.yaml   |  1 -
>  .../bindings/sound/st,stm32-sai.yaml  |  2 --
>  .../bindings/sound/ti,j721e-cpb-audio.yaml|  2 --
>  .../sound/ti,j721e-cpb-ivi-audio.yaml |  2 --
>  17 files changed, 5 insertions(+), 45 deletions(-)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-dw-hdmi.yaml 
> b/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-dw-hdmi.yaml
> index 5d42d36608d9..4951b5ef5c6a 100644
> --- 
> a/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-dw-hdmi.yaml
> +++ 
> b/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-dw-hdmi.yaml
> @@ -174,7 +174,6 @@ examples:
>  phy-names = "phy";
>  pinctrl-names = "default";
>  pinctrl-0 = <_pins>;
> -status = "disabled";
>  
>  ports {
>  #address-cells = <1>;
> @@ -233,7 +232,6 @@ examples:
>  phy-names = "phy";
>  pinctrl-names = "default";
>  pinctrl-0 = <_pins>;
> -status = "disabled";
>  
>  ports {
>  #address-cells = <1>;
> diff --git 
> a/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml 
> b/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml
> index 38bc1d1b511e..b87a2e28c866 100644
> --- a/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml
> @@ -70,7 +70,6 @@ examples:
>  avee-supply = <_lcd>;
>  pp1800-supply = <_lcd>;
>  backlight = <_lcd0>;
> -status = "okay";
>  port {
>  panel_in: endpoint {
>  remote-endpoint = <_out>;
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml 
> b/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml
> index 7c09eec78ce5..877183cf4278 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml
> @@ -200,8 +200,6 @@ examples:
>  clock-names = "pclk", "wrap", "phy", "axi";
>  power-domains = <_pd>;
>  
> -status = "disabled";
> -
>  ports {
>  #address-cells = <1>;
>  #size-cells = <0>;
> diff --git a/Documentation/devicetree/bindings/media/renesas,drif.yaml 
&

Re: (subset) [PATCHv2 0/5] Support for GE B1x5v2 and B1x5Pv2

2021-05-24 Thread Alexandre Belloni
On Thu, 29 Apr 2021 00:29:48 +0200, Sebastian Reichel wrote:
> This series adds support for another General Electric patient
> monitor series (similar to existing Bx50v3), which is based on
> i.MX6DL using Congatec's QMX6 module.
> 
> The module uses an I2C RTC to provide the i.MX6 32768 Hz clock,
> so it's important to keep it enabled. Not doing so results in
> incorrect timings of watchdog and i.MX6 RTC. The bootloader
> enables the watchdog, so disabling the clock results in system
> reboot. [0]
> 
> [...]

Applied, thanks!

[1/5] rtc: m41t80: add support for fixed clock
  commit: f765e349c3e1f2e676ad4bd61197216b26976022

Best regards,
-- 
Alexandre Belloni 


Re: [PATCHv1 1/6] rtc: m41t80: add support for protected clock

2021-02-22 Thread Alexandre Belloni
On 22/02/2021 22:20:47+0100, Alexandre Belloni wrote:
> On 22/02/2021 18:12:42+0100, Sebastian Reichel wrote:
> > Congatec's QMX6 system on module (SoM) uses a m41t62 as RTC. The
> > modules SQW clock output defaults to 32768 Hz. This behaviour is
> > used to provide the i.MX6 CKIL clock. Once the RTC driver is probed,
> > the clock is disabled and all i.MX6 functionality depending on
> > the 32 KHz clock has undefined behaviour. On systems using hardware
> > watchdog it seems to likely trigger a lot earlier than configured.
> > 
> > The proper solution would be to describe this dependency in DT,
> > but that will result in a deadlock. The kernel will see, that
> > i.MX6 system clock needs the RTC clock and do probe deferral.
> > But the i.MX6 I2C module never becomes usable without the i.MX6
> > CKIL clock and thus the RTC's clock will not be probed. So from
> > the kernel's perspective this is a chicken-and-egg problem.
> > 
> 
> Reading the previous paragraph, I was going to suggest describing the
> dependency and wondering whether this would cause a circular dependency.
> I guess this will keep being an issue for clocks on an I2C or SPI bus...
> 
> > Technically everything is fine by not touching anything, since
> > the RTC clock correctly enables the clock on reset (i.e. on
> > battery backup power loss) and also the bootloader enables it
> > in case a kernel without this support has been booted.
> > 
> > The 'protected-clocks' property is already in use for some clocks
> > that may not be touched because of firmware limitations and is
> > described in Documentation/devicetree/bindings/clock/clock-bindings.txt.
> > 
> > Signed-off-by: Sebastian Reichel 
> Acked-by: Alexandre Belloni 

Or maybe you expected me to apply the patch, how are the following
patches dependent on this one?


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCHv1 1/6] rtc: m41t80: add support for protected clock

2021-02-22 Thread Alexandre Belloni
On 22/02/2021 18:12:42+0100, Sebastian Reichel wrote:
> Congatec's QMX6 system on module (SoM) uses a m41t62 as RTC. The
> modules SQW clock output defaults to 32768 Hz. This behaviour is
> used to provide the i.MX6 CKIL clock. Once the RTC driver is probed,
> the clock is disabled and all i.MX6 functionality depending on
> the 32 KHz clock has undefined behaviour. On systems using hardware
> watchdog it seems to likely trigger a lot earlier than configured.
> 
> The proper solution would be to describe this dependency in DT,
> but that will result in a deadlock. The kernel will see, that
> i.MX6 system clock needs the RTC clock and do probe deferral.
> But the i.MX6 I2C module never becomes usable without the i.MX6
> CKIL clock and thus the RTC's clock will not be probed. So from
> the kernel's perspective this is a chicken-and-egg problem.
> 

Reading the previous paragraph, I was going to suggest describing the
dependency and wondering whether this would cause a circular dependency.
I guess this will keep being an issue for clocks on an I2C or SPI bus...

> Technically everything is fine by not touching anything, since
> the RTC clock correctly enables the clock on reset (i.e. on
> battery backup power loss) and also the bootloader enables it
> in case a kernel without this support has been booted.
> 
> The 'protected-clocks' property is already in use for some clocks
> that may not be touched because of firmware limitations and is
> described in Documentation/devicetree/bindings/clock/clock-bindings.txt.
> 
> Signed-off-by: Sebastian Reichel 
Acked-by: Alexandre Belloni 

> ---
>  Documentation/devicetree/bindings/rtc/rtc-m41t80.txt | 1 +
>  drivers/rtc/rtc-m41t80.c | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/rtc-m41t80.txt 
> b/Documentation/devicetree/bindings/rtc/rtc-m41t80.txt
> index c746cb221210..ea4bbf5c4282 100644
> --- a/Documentation/devicetree/bindings/rtc/rtc-m41t80.txt
> +++ b/Documentation/devicetree/bindings/rtc/rtc-m41t80.txt
> @@ -19,6 +19,7 @@ Optional properties:
>  - interrupts: rtc alarm interrupt.
>  - clock-output-names: From common clock binding to override the default 
> output
>clock name
> +- protected-clocks: Bool, if set operating system should not handle clock.
>  - wakeup-source: Enables wake up of host system on alarm
>  
>  Example:
> diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
> index 160dcf68e64e..3296583853a8 100644
> --- a/drivers/rtc/rtc-m41t80.c
> +++ b/drivers/rtc/rtc-m41t80.c
> @@ -546,6 +546,9 @@ static struct clk *m41t80_sqw_register_clk(struct 
> m41t80_data *m41t80)
>   struct clk_init_data init;
>   int ret;
>  
> + if (of_property_read_bool(node, "protected-clocks"))
> +     return 0;
> +
>   /* First disable the clock */
>   ret = i2c_smbus_read_byte_data(client, M41T80_REG_ALARM_MON);
>   if (ret < 0)
> -- 
> 2.30.0
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [GIT PULL] ib-drm-gpio-pdx86-rtc-wdt-v5.12-1

2021-02-04 Thread Alexandre Belloni
On 04/02/2021 11:50:03+0100, Hans de Goede wrote:
> Hi,
> 
> On 2/4/21 11:36 AM, Daniel Vetter wrote:
> > On Thu, Feb 4, 2021 at 11:19 AM Patrik Jakobsson
> >  wrote:
> >>
> >> On Wed, Feb 3, 2021 at 1:00 PM Andy Shevchenko
> >>  wrote:
> >>>
> >>> On Tue, Jan 26, 2021 at 5:25 PM Patrik Jakobsson
> >>>  wrote:
> >>>> On Tue, Jan 26, 2021 at 1:37 PM Andy Shevchenko
> >>>>  wrote:
> >>>>>
> >>>>> Hi guys,
> >>>>>
> >>>>> This is first part of Intel MID outdated platforms removal. It's 
> >>>>> collected into
> >>>>> immutable branch with a given tag, please pull to yours subsystems.
> >>>>
> >>>> Hi Andy,
> >>>> Do you plan on eventually removing X86_INTEL_MID completely? If so,
> >>>> then I should probably start looking at removing the corresponding
> >>>> parts in GMA500.
> >>>
> >>> I have noticed new commits in DRM against GMA500 and it seems now in a
> >>> conflict with my immutable branch. Are you sure you don't forget to
> >>> pull it?
> >>
> >> Hi Andy, sorry I missed pulling the immutable branch before taking the
> >> gma500 medfield removal. I was unsure how to do that through drm-misc
> >> and it's tools so I got sidetracked. What would be the correct way to
> >> fix this?
> > 
> > Imo Linus can resolve this, it's pretty trivial, as long as both pull
> > requests point it out to him.
> 
> The removal of older Intel platforms touches a number of subsystem trees,
> the idea about the IM branch was that all subsystem-trees would merge that.
> 
> I can certainly point out the problem in the pdx86 pull-req to Linus,
> but the GPIO pull-req also contains a merge of the IM branch as will
> the x86/tip and rtc pull-reqs I believe. We can add a remark to all
> the pull-reqs about the issue I guess ?
> 

FWIW, I'm not going to merge the PR in the rtc tree because it is a
simple removal and doesn't have any conflicts.

> But it might be better to still merge the branch into drm-misc-next and
> resolve the conflict there. I think that should avoid Linus seeing it ?
> 

Linus doesn't mind seeing and solving conflicts.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/4] dt-bindings: Add missing 'unevaluatedProperties'

2020-10-08 Thread Alexandre Belloni
Hi,

On 05/10/2020 13:38:27-0500, Rob Herring wrote:
> diff --git a/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml 
> b/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
> index bc2c7e53a28e..60e93e86ad9d 100644
> --- a/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
> @@ -68,6 +68,8 @@ required:
>- clocks
>- clock-names
>  
> +unevaluatedProperties: false

This one could be additionalProperties: false after adding start-year to
the properties

> +
>  examples:
>- |
>  #include 
> diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml 
> b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> index 76bbf8b7555b..d51b236939bf 100644
> --- a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
> @@ -74,6 +74,8 @@ allOf:
>items:
>  - const: rtc
>  
> +unevaluatedProperties: false

This one can be simply additionalProperties: false


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 4/4] dt-bindings: Explicitly allow additional properties in common schemas

2020-10-08 Thread Alexandre Belloni
On 05/10/2020 13:38:30-0500, Rob Herring wrote:
> In order to add meta-schema checks for additional/unevaluatedProperties
> being present, all schema need to make this explicit. As common/shared
> schema are included by other schemas, they should always allow for
> additionalProperties.
> 
> Signed-off-by: Rob Herring 
Acked-by: Alexandre Belloni 

> ---
>  Documentation/devicetree/bindings/arm/cpus.yaml  | 2 ++
>  .../devicetree/bindings/arm/nvidia,tegra194-ccplex.yaml  | 2 ++
>  Documentation/devicetree/bindings/ata/pata-common.yaml   | 2 ++
>  Documentation/devicetree/bindings/ata/sata-common.yaml   | 2 ++
>  Documentation/devicetree/bindings/bus/simple-pm-bus.yaml | 2 ++
>  .../devicetree/bindings/chrome/google,cros-ec-typec.yaml | 2 ++
>  .../devicetree/bindings/connector/usb-connector.yaml | 2 ++
>  .../devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml | 2 ++
>  .../devicetree/bindings/display/dsi-controller.yaml  | 2 ++
>  Documentation/devicetree/bindings/display/panel/lvds.yaml| 2 ++
>  .../devicetree/bindings/display/panel/panel-common.yaml  | 2 ++
>  Documentation/devicetree/bindings/dma/dma-common.yaml| 2 ++
>  Documentation/devicetree/bindings/dma/dma-controller.yaml| 2 ++
>  Documentation/devicetree/bindings/dma/dma-router.yaml| 2 ++
>  Documentation/devicetree/bindings/extcon/wlf,arizona.yaml| 2 ++
>  .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml  | 5 -
>  Documentation/devicetree/bindings/iio/common.yaml| 2 ++
>  Documentation/devicetree/bindings/input/input.yaml   | 2 ++
>  Documentation/devicetree/bindings/input/matrix-keymap.yaml   | 2 ++
>  .../devicetree/bindings/input/touchscreen/touchscreen.yaml   | 2 ++
>  Documentation/devicetree/bindings/leds/common.yaml   | 2 ++
>  .../devicetree/bindings/leds/leds-class-multicolor.yaml  | 3 +++
>  Documentation/devicetree/bindings/leds/trigger-source.yaml   | 2 ++
>  Documentation/devicetree/bindings/media/rc.yaml  | 2 ++
>  Documentation/devicetree/bindings/mfd/syscon.yaml| 2 +-
>  Documentation/devicetree/bindings/mmc/mmc-controller.yaml| 2 ++
>  .../devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml | 2 ++
>  Documentation/devicetree/bindings/mtd/nand-controller.yaml   | 2 ++
>  .../devicetree/bindings/net/can/can-transceiver.yaml | 2 ++
>  Documentation/devicetree/bindings/net/dsa/dsa.yaml   | 2 ++
>  .../devicetree/bindings/net/ethernet-controller.yaml | 2 ++
>  Documentation/devicetree/bindings/net/ethernet-phy.yaml  | 2 ++
>  Documentation/devicetree/bindings/net/mdio.yaml  | 2 ++
>  Documentation/devicetree/bindings/net/snps,dwmac.yaml| 2 ++
>  Documentation/devicetree/bindings/nvmem/nvmem-consumer.yaml  | 2 ++
>  Documentation/devicetree/bindings/nvmem/nvmem.yaml   | 2 ++
>  Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml  | 2 ++
>  Documentation/devicetree/bindings/pci/cdns-pcie-host.yaml| 2 ++
>  Documentation/devicetree/bindings/pci/cdns-pcie.yaml | 2 ++
>  Documentation/devicetree/bindings/pci/pci-ep.yaml| 2 ++
>  Documentation/devicetree/bindings/pinctrl/cirrus,madera.yaml | 2 ++
>  Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml   | 2 ++
>  Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml   | 2 ++
>  Documentation/devicetree/bindings/power/power-domain.yaml| 2 ++
>  .../devicetree/bindings/power/supply/power-supply.yaml   | 2 ++
>  Documentation/devicetree/bindings/pwm/pwm.yaml   | 2 ++
>  Documentation/devicetree/bindings/regulator/regulator.yaml   | 2 ++
>  Documentation/devicetree/bindings/regulator/wlf,arizona.yaml | 2 ++
>  Documentation/devicetree/bindings/riscv/cpus.yaml| 2 ++
>  Documentation/devicetree/bindings/rtc/rtc.yaml   | 2 ++
>  Documentation/devicetree/bindings/serial/rs485.yaml  | 3 +++
>  Documentation/devicetree/bindings/serial/serial.yaml | 2 ++
>  Documentation/devicetree/bindings/soc/imx/fsl,aips-bus.yaml  | 2 ++
>  Documentation/devicetree/bindings/sound/amlogic,aiu.yaml | 2 ++
>  Documentation/devicetree/bindings/sound/cirrus,madera.yaml   | 2 ++
>  .../devicetree/bindings/sound/nvidia,tegra210-ahub.yaml  | 3 +++
>  Documentation/devicetree/bindings/sound/wlf,arizona.yaml | 2 ++
>  .../devicetree/bindings/soundwire/soundwire-controller.yaml  | 2 ++
>  Documentation/devicetree/bindings/spi/spi-controller.yaml| 2 ++
>  Documentation/devicetree/bindings/spmi/spmi.yaml | 2 ++
>  .../devicetree/bindings/thermal/thermal-cooling-devices.yaml | 2 ++
>  .../devicetree/bindings/thermal/thermal-sensor.yaml  | 2 ++
>  Documentation/devic

Re: [PATCH 1/2] dt-bindings: Clean-up schema indentation formatting

2020-04-17 Thread Alexandre Belloni
On 15/04/2020 19:55:48-0500, Rob Herring wrote:
> Fix various inconsistencies in schema indentation. Most of these are
> list indentation which should be 2 spaces more than the start of the
> enclosing keyword. This doesn't matter functionally, but affects running
> scripts which do transforms on the schema files.
> 
> Signed-off-by: Rob Herring 

Acked-by: Alexandre Belloni 

> ---
>  .../devicetree/bindings/arm/altera.yaml   |  6 +-
>  .../amlogic/amlogic,meson-gx-ao-secure.yaml   |  2 +-
>  .../devicetree/bindings/arm/bitmain.yaml  |  2 +-
>  .../devicetree/bindings/arm/nxp/lpc32xx.yaml  |  9 ++-
>  .../bindings/arm/socionext/uniphier.yaml  | 26 
>  .../bindings/arm/stm32/st,mlahb.yaml  |  2 +-
>  .../bindings/arm/stm32/st,stm32-syscon.yaml   |  6 +-
>  .../bindings/ata/faraday,ftide010.yaml|  4 +-
>  .../bindings/bus/allwinner,sun8i-a23-rsb.yaml |  4 +-
>  .../clock/allwinner,sun4i-a10-gates-clk.yaml  |  8 +--
>  .../devicetree/bindings/clock/fsl,plldig.yaml | 17 +++--
>  .../devicetree/bindings/clock/qcom,mmcc.yaml  | 16 ++---
>  .../bindings/connector/usb-connector.yaml |  6 +-
>  .../crypto/allwinner,sun4i-a10-crypto.yaml| 14 ++--
>  .../bindings/crypto/allwinner,sun8i-ce.yaml   | 16 ++---
>  .../bindings/crypto/amlogic,gxl-crypto.yaml   |  2 +-
>  .../display/allwinner,sun4i-a10-hdmi.yaml | 40 ++--
>  .../display/allwinner,sun4i-a10-tcon.yaml | 58 -
>  .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 28 
>  .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 10 +--
>  .../bindings/display/bridge/lvds-codec.yaml   | 18 +++---
>  .../display/panel/sony,acx424akp.yaml |  2 +-
>  .../display/panel/xinpeng,xpp055c272.yaml |  4 +-
>  .../bindings/display/renesas,cmm.yaml | 16 ++---
>  .../devicetree/bindings/dma/ti/k3-udma.yaml   |  8 +--
>  .../bindings/gpio/brcm,xgs-iproc-gpio.yaml|  2 +-
>  .../bindings/gpu/arm,mali-midgard.yaml| 18 +++---
>  .../devicetree/bindings/gpu/vivante,gc.yaml   |  2 +-
>  .../devicetree/bindings/i2c/i2c-rk3x.yaml | 10 +--
>  .../bindings/iio/adc/adi,ad7124.yaml  |  4 +-
>  .../bindings/iio/adc/lltc,ltc2496.yaml|  6 +-
>  .../input/allwinner,sun4i-a10-lradc-keys.yaml |  4 +-
>  .../bindings/input/touchscreen/goodix.yaml|  2 +-
>  .../bindings/interconnect/qcom,msm8916.yaml   |  4 +-
>  .../bindings/interconnect/qcom,msm8974.yaml   |  4 +-
>  .../bindings/interconnect/qcom,qcs404.yaml|  4 +-
>  .../allwinner,sun7i-a20-sc-nmi.yaml   | 12 ++--
>  .../intel,ixp4xx-interrupt.yaml   |  8 +--
>  .../interrupt-controller/st,stm32-exti.yaml   | 12 ++--
>  .../bindings/iommu/samsung,sysmmu.yaml| 10 +--
>  .../bindings/mailbox/st,stm32-ipcc.yaml   |  2 +-
>  .../media/allwinner,sun4i-a10-csi.yaml| 28 
>  .../bindings/media/amlogic,gx-vdec.yaml   | 14 ++--
>  .../bindings/media/renesas,ceu.yaml   | 28 
>  .../bindings/media/renesas,vin.yaml   |  8 +--
>  .../devicetree/bindings/media/ti,vpe.yaml |  2 +-
>  .../memory-controllers/fsl/imx8m-ddrc.yaml|  6 +-
>  .../bindings/mfd/st,stm32-lptimer.yaml|  4 +-
>  .../bindings/mfd/st,stm32-timers.yaml |  4 +-
>  .../devicetree/bindings/mfd/syscon.yaml   | 12 ++--
>  .../devicetree/bindings/mmc/cdns,sdhci.yaml   |  2 +-
>  .../bindings/mmc/rockchip-dw-mshc.yaml| 16 ++---
>  .../bindings/mmc/socionext,uniphier-sd.yaml   | 14 ++--
>  .../devicetree/bindings/mtd/denali,nand.yaml  |  4 +-
>  .../net/allwinner,sun8i-a83t-emac.yaml|  4 +-
>  .../bindings/net/can/bosch,m_can.yaml | 52 +++
>  .../bindings/net/renesas,ether.yaml   |  4 +-
>  .../bindings/net/ti,cpsw-switch.yaml  | 12 ++--
>  .../bindings/net/ti,davinci-mdio.yaml | 27 
>  .../bindings/phy/intel,lgm-emmc-phy.yaml  |  2 +-
>  .../devicetree/bindings/pwm/pwm-samsung.yaml  | 16 ++---
>  .../bindings/remoteproc/st,stm32-rproc.yaml   |  2 +-
>  .../reset/brcm,bcm7216-pcie-sata-rescal.yaml  |  4 +-
>  .../devicetree/bindings/rtc/st,stm32-rtc.yaml | 38 +--
>  .../bindings/serial/amlogic,meson-uart.yaml   | 16 ++---
>  .../devicetree/bindings/serial/rs485.yaml | 17 ++---
>  .../bindings/soc/amlogic/amlogic,canvas.yaml  | 10 +--
>  .../bindings/sound/renesas,fsi.yaml   | 16 ++---
>  .../bindings/spi/qcom,spi-qcom-qspi.yaml  | 10 +--
>  .../devicetree/bindings/spi/renesas,hspi.yaml |  4 +-
>  .../devicetree/bindings/spi/spi-pl022.yaml|  2 +-
>  .../bindings/spi/st,stm32-qspi.yaml   |  4 +-
>  .../allwinner,sun4i-a10-system-control.yaml   | 64 +--
>  .../bindings/thermal/amlogic,thermal.yaml | 10

Re: [PATCH 05/46] ARM: pxa: split up mach/hardware.h

2019-10-19 Thread Alexandre Belloni
On 18/10/2019 17:41:20+0200, Arnd Bergmann wrote:
> The mach/hardware.h is included in lots of places, and it provides
> three different things on pxa:
> 
> - the cpu_is_pxa* macros
> - an indirect inclusion of mach/addr-map.h
> - the __REG() and io_pv2() helper macros
> 
> Split it up into separate  and mach/pxa-regs.h
> headers, then change all the files that use mach/hardware.h to
> include the exact set of those three headers that they actually
> need, allowing for further more targeted cleanup.
> 
> linux/soc/pxa/cpu.h can remain permanently exported and is now in
> a global location along with similar headers. pxa-regs.h and
> addr-map.h are only used in a very small number of drivers now
> and can be moved to arch/arm/mach-pxa/ directly when those drivers
> are to pass the necessary data as resources.
> 
> Cc: Michael Turquette 
> Cc: Stephen Boyd 
> Cc: Viresh Kumar 
> Cc: Dmitry Torokhov 
> Cc: Jacek Anaszewski 
> Cc: Pavel Machek 
> Cc: Ulf Hansson 
> Cc: Dominik Brodowski 
> Cc: Alexandre Belloni 
> Cc: Greg Kroah-Hartman 
> Cc: Guenter Roeck 
> Cc: Mark Brown 
> Cc: linux-...@vger.kernel.org
> Cc: linux...@vger.kernel.org
> Cc: linux-in...@vger.kernel.org
> Cc: linux-l...@vger.kernel.org
> Cc: linux-...@vger.kernel.org
> Cc: linux-...@lists.infradead.org
> Cc: linux-...@vger.kernel.org
> Cc: linux-...@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-fb...@vger.kernel.org
> Cc: linux-watch...@vger.kernel.org
> Cc: alsa-de...@alsa-project.org
> Signed-off-by: Arnd Bergmann 

For rtc: Acked-by: Alexandre Belloni 

> ---
>  arch/arm/common/locomo.c  |  1 -
>  arch/arm/common/sa.c  |  5 +-
>  arch/arm/mach-pxa/cm-x2xx.c   |  2 +
>  arch/arm/mach-pxa/cm-x300.c   |  2 +
>  arch/arm/mach-pxa/colibri-evalboard.c |  1 -
>  arch/arm/mach-pxa/colibri-pxa270-income.c |  1 -
>  arch/arm/mach-pxa/colibri-pxa300.c|  1 +
>  arch/arm/mach-pxa/colibri-pxa3xx.c|  1 -
>  arch/arm/mach-pxa/corgi.c |  1 -
>  arch/arm/mach-pxa/corgi_pm.c  |  1 -
>  arch/arm/mach-pxa/csb726.c|  1 +
>  arch/arm/mach-pxa/devices.c   |  2 +-
>  arch/arm/mach-pxa/ezx.c   |  1 -
>  arch/arm/mach-pxa/generic.c   |  3 +-
>  arch/arm/mach-pxa/gumstix.c   |  1 -
>  arch/arm/mach-pxa/hx4700.c|  2 +-
>  arch/arm/mach-pxa/idp.c   |  1 -
>  arch/arm/mach-pxa/include/mach/pxa-regs.h | 52 
>  arch/arm/mach-pxa/include/mach/pxa2xx-regs.h  |  2 +-
>  arch/arm/mach-pxa/include/mach/pxa3xx-regs.h  |  2 +-
>  arch/arm/mach-pxa/include/mach/regs-ac97.h|  2 +-
>  arch/arm/mach-pxa/include/mach/regs-ost.h |  2 +-
>  arch/arm/mach-pxa/include/mach/trizeps4.h |  1 +
>  arch/arm/mach-pxa/irq.c   |  3 +-
>  arch/arm/mach-pxa/littleton.c |  1 -
>  arch/arm/mach-pxa/lpd270.c|  2 +-
>  arch/arm/mach-pxa/lubbock.c   |  1 -
>  arch/arm/mach-pxa/magician.c  |  2 +-
>  arch/arm/mach-pxa/mainstone.c |  2 +-
>  arch/arm/mach-pxa/mfp-pxa2xx.c|  1 +
>  arch/arm/mach-pxa/mfp-pxa3xx.c|  1 -
>  arch/arm/mach-pxa/poodle.c|  1 -
>  arch/arm/mach-pxa/pxa-regs.h  |  1 +
>  arch/arm/mach-pxa/pxa25x.c|  3 +-
>  arch/arm/mach-pxa/pxa25x.h|  2 +-
>  arch/arm/mach-pxa/pxa27x-udc.h|  2 +
>  arch/arm/mach-pxa/pxa27x.c|  3 +-
>  arch/arm/mach-pxa/pxa27x.h|  2 +-
>  arch/arm/mach-pxa/pxa2xx.c|  1 -
>  arch/arm/mach-pxa/pxa300.c|  1 +
>  arch/arm/mach-pxa/pxa320.c|  1 +
>  arch/arm/mach-pxa/pxa3xx-ulpi.c   |  2 +-
>  arch/arm/mach-pxa/pxa3xx.c|  3 +-
>  arch/arm/mach-pxa/pxa3xx.h|  2 +-
>  arch/arm/mach-pxa/pxa930.c|  1 +
>  arch/arm/mach-pxa/regs-rtc.h  |  2 +-
>  arch/arm/mach-pxa/regs-uart.h |  2 +
>  arch/arm/mach-pxa/sleep.S |  1 -
>  arch/arm/mach-pxa/smemc.c |  2 +-
>  arch/arm/mach-pxa/spitz_pm.c  |  1 -
>  arch/arm/mach-pxa/standby.S   |  1 -
>  arch/arm/mach-pxa/xcep.c  |  2 +-
>  arch/arm/mach-pxa/zylonite.c  |  1 +
>  arch/arm/mach-pxa/zylonite.h  |  2 +
>  arch/arm/mach-pxa/zylonite_pxa300.c   |  1 +
>  arch/

Re: [PATCH v3] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-06-01 Thread Alexandre Belloni
On 30/05/2019 14:30:19+0200, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to atmel_lcdfb driver for better compile
> testing coverage.
> 
> While at it fix improper use of UL (to silence build warnings on
> x86_64).
> 
> Cc: Alexandre Belloni 
Acked-by: Alexandre Belloni 

> Cc: Ludovic Desroches 
> Signed-off-by: Bartlomiej Zolnierkiewicz 
> ---
> v3: fix build warnings on x86_64

Hopefully, no building errors anymore ;)

> 
> v2: add missing HAVE_CLK && HAS IOMEM dependencies
> 
>  drivers/video/fbdev/Kconfig   |3 ++-
>  drivers/video/fbdev/atmel_lcdfb.c |4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> Index: b/drivers/video/fbdev/Kconfig
> ===
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -855,7 +855,8 @@ config FB_S1D13XXX
>  
>  config FB_ATMEL
>   tristate "AT91 LCD Controller support"
> - depends on FB && OF && HAVE_FB_ATMEL
> + depends on FB && OF && HAVE_CLK && HAS_IOMEM
> + depends on HAVE_FB_ATMEL || COMPILE_TEST
>   select FB_BACKLIGHT
>   select FB_CFB_FILLRECT
>   select FB_CFB_COPYAREA
> Index: b/drivers/video/fbdev/atmel_lcdfb.c
> ===
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -673,7 +673,7 @@ static int atmel_lcdfb_set_par(struct fb
>   lcdc_writel(sinfo, ATMEL_LCDC_MVAL, 0);
>  
>   /* Disable all interrupts */
> - lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
> + lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
>   /* Enable FIFO & DMA errors */
>   lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI | ATMEL_LCDC_OWRI | 
> ATMEL_LCDC_MERI);
>  
> @@ -1291,7 +1291,7 @@ static int atmel_lcdfb_suspend(struct pl
>* We don't want to handle interrupts while the clock is
>* stopped. It may take forever.
>*/
> - lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
> + lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
>  
>   sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
>   lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH v2] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-05-21 Thread Alexandre Belloni
On 21/05/2019 12:52:17+0200, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to atmel_lcdfb driver for better compile
> testing coverage.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 
Reviewed-by: Alexandre Belloni 

> ---
> v2: add missing HAVE_CLK && HAS IOMEM dependencies
> 
>  drivers/video/fbdev/Kconfig |3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: b/drivers/video/fbdev/Kconfig
> ===
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -856,7 +856,8 @@ config FB_S1D13XXX
>  
>  config FB_ATMEL
>   tristate "AT91 LCD Controller support"
> - depends on FB && OF && HAVE_FB_ATMEL
> + depends on FB && OF && HAVE_CLK && HAS_IOMEM
> + depends on HAVE_FB_ATMEL || COMPILE_TEST
>   select FB_BACKLIGHT
>   select FB_CFB_FILLRECT
>   select FB_CFB_COPYAREA

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-04-16 Thread Alexandre Belloni
On 12/04/2019 13:29:11+0200, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to atmel_lcdfb driver for better compile
> testing coverage.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 
Acked-by: Alexandre Belloni 

> ---
>  drivers/video/fbdev/Kconfig |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: b/drivers/video/fbdev/Kconfig
> ===
> --- a/drivers/video/fbdev/Kconfig 2019-04-12 13:12:24.0 +0200
> +++ b/drivers/video/fbdev/Kconfig 2019-04-12 13:15:03.986235226 +0200
> @@ -859,7 +859,7 @@ config FB_S1D13XXX
>  
>  config FB_ATMEL
>   tristate "AT91 LCD Controller support"
> - depends on FB && OF && HAVE_FB_ATMEL
> + depends on FB && OF && (HAVE_FB_ATMEL || COMPILE_TEST)
>   select FB_BACKLIGHT
>   select FB_CFB_FILLRECT
>   select FB_CFB_COPYAREA

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 0/7] add LCD support for SAM9X60

2019-03-01 Thread Alexandre Belloni
On 28/02/2019 19:21:19+0100, Sam Ravnborg wrote:
> Hi Claudiu
> 
> On Wed, Feb 27, 2019 at 04:24:11PM +, claudiu.bez...@microchip.com wrote:
> > From: Claudiu Beznea 
> > 
> > Hi,
> > 
> > These patches adds support for SAM9X60's LCD controller.
> Can you elaborate a little more which chips that are relevant.
> To be able to look into the right data-sheet, while reviewing.
> Link to data-sheet would be nice too.
> 

sam9x60 is the chip name (i.e. x is not a wildcard). I don't think the
datasheet is finished/public yet.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support

2019-02-26 Thread Alexandre Belloni
Make the driver OF only as since AVR32 has been removed from the kernel,
there are only OF enabled platform using it.

Signed-off-by: Alexandre Belloni 
---
 drivers/video/fbdev/Kconfig   |   6 +-
 drivers/video/fbdev/atmel_lcdfb.c | 114 ++
 2 files changed, 7 insertions(+), 113 deletions(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index ae7712c9687a..f0f07d02af88 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -866,8 +866,8 @@ config FB_S1D13XXX
  <http://vdc.epson.com/>
 
 config FB_ATMEL
-   tristate "AT91/AT32 LCD Controller support"
-   depends on FB && HAVE_FB_ATMEL
+   tristate "AT91 LCD Controller support"
+   depends on FB && OF && HAVE_FB_ATMEL
select FB_BACKLIGHT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
@@ -875,7 +875,7 @@ config FB_ATMEL
select FB_MODE_HELPERS
select VIDEOMODE_HELPERS
help
- This enables support for the AT91/AT32 LCD Controller.
+ This enables support for the AT91 LCD Controller.
 
 config FB_NVIDIA
tristate "nVidia Framebuffer Support"
diff --git a/drivers/video/fbdev/atmel_lcdfb.c 
b/drivers/video/fbdev/atmel_lcdfb.c
index 4ed55e6bbb84..b8786ff62b87 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1,5 +1,5 @@
 /*
- *  Driver for AT91/AT32 LCD Controller
+ *  Driver for AT91 LCD Controller
  *
  *  Copyright (C) 2007 Atmel Corporation
  *
@@ -99,86 +99,6 @@ static struct atmel_lcdfb_config at91sam9rl_config = {
.have_intensity_bit = true,
 };
 
-static struct atmel_lcdfb_config at32ap_config = {
-   .have_hozval= true,
-};
-
-static const struct platform_device_id atmel_lcdfb_devtypes[] = {
-   {
-   .name = "at91sam9261-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   .name = "at91sam9263-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   .name = "at91sam9g10-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   .name = "at91sam9g45-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   .name = "at91sam9g45es-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   .name = "at91sam9rl-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   .name = "at32ap-lcdfb",
-   .driver_data = (unsigned long)_config,
-   }, {
-   /* terminator */
-   }
-};
-MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes);
-
-static struct atmel_lcdfb_config *
-atmel_lcdfb_get_config(struct platform_device *pdev)
-{
-   unsigned long data;
-
-   data = platform_get_device_id(pdev)->driver_data;
-
-   return (struct atmel_lcdfb_config *)data;
-}
-
-#if defined(CONFIG_ARCH_AT91)
-#defineATMEL_LCDFB_FBINFO_DEFAULT  (FBINFO_DEFAULT \
-| FBINFO_PARTIAL_PAN_OK \
-| FBINFO_HWACCEL_YPAN)
-
-static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
-   struct fb_var_screeninfo *var,
-   struct fb_info *info)
-{
-
-}
-#elif defined(CONFIG_AVR32)
-#defineATMEL_LCDFB_FBINFO_DEFAULT  (FBINFO_DEFAULT \
-   | FBINFO_PARTIAL_PAN_OK \
-   | FBINFO_HWACCEL_XPAN \
-   | FBINFO_HWACCEL_YPAN)
-
-static void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
-struct fb_var_screeninfo *var,
-struct fb_info *info)
-{
-   u32 dma2dcfg;
-   u32 pixeloff;
-
-   pixeloff = (var->xoffset * info->var.bits_per_pixel) & 0x1f;
-
-   dma2dcfg = (info->var.xres_virtual - info->var.xres)
-* info->var.bits_per_pixel / 8;
-   dma2dcfg |= pixeloff << ATMEL_LCDC_PIXELOFF_OFFSET;
-   lcdc_writel(sinfo, ATMEL_LCDC_DMA2DCFG, dma2dcfg);
-
-   /* Update configuration */
-   lcdc_writel(sinfo, ATMEL_LCDC_DMACON,
-   lcdc_readl(sinfo, ATMEL_LCDC_DMACON)
-   | ATMEL_LCDC_DMAUPDT);
-}
-#endif
-
 static u32 contrast_ctr = ATMEL_LCDC_PS_DIV8
| ATMEL_LCDC_POL_POSITIVE
| ATMEL_LCDC_ENA_PWMENABLE;
@@ -404,8 +324,6 @@ static void atmel_lcdfb_update_dma(struct fb_info *info,
 
/* Set framebuffer DMA base address and pixel offset */
lcdc_writel(sinfo, ATMEL_LCDC_DMABADDR1, dma_addr);
-
-   atmel_lcdfb_update_dma2d(sinfo, var, info);
 }
 
 static inl

[PATCH] drm/i915: fix spelling mistake "reserverd" -> "reserved"

2018-11-21 Thread Alexandre Belloni
Fix a spelling mistake in a comment.

Signed-off-by: Alexandre Belloni 
---
 drivers/gpu/drm/i915/i915_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index f9ce35da4123..742f8ff101e4 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4280,7 +4280,7 @@ static void gen10_sseu_device_status(struct 
drm_i915_private *dev_priv,
for (s = 0; s < info->sseu.max_slices; s++) {
/*
 * FIXME: Valid SS Mask respects the spec and read
-* only valid bits for those registers, excluding reserverd
+* only valid bits for those registers, excluding reserved
 * although this seems wrong because it would leave many
 * subslices without ACK.
 */
-- 
2.19.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [RFC PATCH 0/7] add at91sam9 LCDC DRM driver

2018-08-15 Thread Alexandre Belloni
On 13/08/2018 20:18:08+0200, Sam Ravnborg wrote:
> > Would be good to have a plan to phase-out the old atmel_lcdfb fbdev
> > driver when this one addresses some TODO items that make sense.
> Agree on this.
> One approach could be to say that when all in-kernel users of atmel_lcdfb
> are ported, then the old driver could be dropped after a kernel release.
> 

I would drop it only after an LTS release.

> > The mfd suffix seems strange to me. What about "atmel,at91sam9263-lcdc-mfd"
> > => "atmel,at91sam9263-lcd" (or "microchip,at91sam9263-lcdc").
> The "-mfd" suffix was added to avoid clashing with the current
> compatible string used by the atmel_lcdfb driver.
> 
> I susggest we do the following:
> - use the microchip prefix, as this is now owned by microchip
> - and add the driver to a drm/microchip/ directory
> (Then we can only hope that microchip do not change name or
> are purchased by someone else).
> 

The compatible string should remain the same but the drivers have to be
mutually exclusive in Kconfig.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-27 Thread Alexandre Belloni
Hi,

On 26/04/2018 15:45:44+0300, Laurent Pinchart wrote:
> Hi Daniel,
> 
> On Thursday, 26 April 2018 15:36:15 EEST Daniel Vetter wrote:
> > On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote:
> > > It's been a while since we introduced drm_dev{get/put} functions
> > > to replace reference/unreference in drm subsystem for the
> > > consistency purpose. So, with this patch, let's just replace
> > > all current use cases of drm_dev_unref() with drm_dev_put and remove
> > > the function itself.
> > > 
> > > Coccinelle was used for mass-patching.
> > > 
> > > Signed-off-by: Vaishali Thakkar <vthakkar1...@gmail.com>
> > 
> > Thanks for doing this. Unfortunately drm moves pretty fast, so already a
> > conflict when I tried to apply this. Some drivers are also in their own
> > trees, so this might lead to more fun :-/
> > 
> > Can you pls split it up per-driver (just the directories under
> > drivers/gpu/drm/ is enough)? Final patch to remove the function might then
> > get stalled a bit ofc.
> 
> I requested a single patch instead of splitting it per driver, you might want 
> to blame me for that.
> 

Doesn't splitting the change per driver break bisectability unless there
is a guarantee that the change in include/drm/drm_drv.h is applied after
all the driver trees have been merged?


-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 4/5] ARM: dts: Add support for emtrion emCON-MX6 series

2017-12-29 Thread Alexandre Belloni
On 26/12/2017 at 11:16:34 -0600, Rob Herring wrote:
> On Fri, Dec 22, 2017 at 4:56 AM, Alexandre Belloni
> <alexandre.bell...@free-electrons.com> wrote:
> > + Philippe
> >
> > On 22/12/2017 at 11:43:33 +0100, Andreas Färber wrote:
> >> >> I'll change it for v3 of this patch however it will end up like this:
> >> >> //SPDX-License...
> >> >
> >> > That should be /* SPDX-License */, // is for c files.
> >>
> >> Got any reference for that? Since we're using the C preprocessor before
> >> feeding them to dtc, we can use the same // style for both, builds fine.
> >>
> >> Only for my private DT overlay files that I use directly with dtc I
> >> couldn't adopt that style.
> 
> We are well past the point of being able to build most dts files with just 
> dtc.
> 
> > The doc states:
> >
> > If a specific tool cannot handle the standard comment style, then the
> > appropriate comment mechanism which the tool accepts shall be used. This
> > is the reason for having the "/\* \*/" style comment in C header
> > files.
> >
> > I interpreted that as dtc doesn't handle // comments, use /**/
> 
> It's been so long, I'd forgotten that. Perhaps we should fix dtc to
> handle // comments.
> 

The would probably be the best solution so we get a somewhat consistent
style before people start moving the existing SDPX identifiers to the
top of their dtsi/dts files.

> >
> > But I agree it also states:
> > .dts{i}:  // SPDX-License-Identifier: 
> 
> Or we could still change this. The guidelines aren't merged yet.
> 
> Rob

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 4/5] ARM: dts: Add support for emtrion emCON-MX6 series

2017-12-23 Thread Alexandre Belloni
Hi,

On 22/12/2017 at 11:34:31 +0100, Türk, Jan wrote:
> > > diff --git a/arch/arm/boot/dts/imx6q-emcon.dtsi b/arch/arm/boot/dts/imx6q-
> > emcon.dtsi
> > > new file mode 100644
> > > index ..64fc0cd74c05
> > > --- /dev/null
> > > +++ b/arch/arm/boot/dts/imx6q-emcon.dtsi
> > > @@ -0,0 +1,37 @@
> > > +/*
> > > + * Copyright (C) 2017 emtrion GmbH
> > > + * Author: Jan Tuerk  <jan.tu...@emtrion.com>
> > > + *
> > > + * The code contained herein is licensed under the GNU General Public
> > > + * License. You may obtain a copy of the GNU General Public License
> > > + * Version 2 or later at the following locations:
> > > + *
> > > + * http://www.opensource.org/licenses/gpl-license.html
> > > + * http://www.gnu.org/copyleft/gpl.html
> > 
> > You don't need this if...
> 
> I've got a little different point of view on this since the OSS Europe 2017 - 
> part of gpl2 following.
> 
> GPLv2-Para1 (=>highlighted<=) :
> 1. You may copy and distribute verbatim copies of the Program's source code 
> as you receive it, in any medium,
>  provided that you conspicuously and appropriately publish on each copy an 
> => appropriate copyright notice and disclaimer of warranty; <=
> keep intact all the notices that refer to this License and to the absence of 
> any warranty;
>  and give any other recipients of the Program a copy of this License along 
> with the Program.
> 
> After reviewing this I think apparently I should include the Warranty 
> disclaimer as well.
> Examples could be found  in:
> arch/arm/boot/dts/imx6q-tbs2910.dts
> and
> arch/arm/boot/dts/imx6q-zii-rdu2.dts
> 

The license is already fully included in COPYING with the warranty
disclaimer.

> > 
> > > + *
> > > + * SPDX-License-Identifier: GPL-2.0
> > 
> > You have this.
> > 
> > Also, the rules around this are getting a bit stricter saying the SPDX
> > tag should be the first line of the file using a C++ style comment.
> > 
> I'll change it for v3 of this patch however it will end up like this:
> //SPDX-License...

That should be /* SPDX-License */, // is for c files.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 4/5] ARM: dts: Add support for emtrion emCON-MX6 series

2017-12-23 Thread Alexandre Belloni
+ Philippe

On 22/12/2017 at 11:43:33 +0100, Andreas Färber wrote:
> >> I'll change it for v3 of this patch however it will end up like this:
> >> //SPDX-License...
> > 
> > That should be /* SPDX-License */, // is for c files.
> 
> Got any reference for that? Since we're using the C preprocessor before
> feeding them to dtc, we can use the same // style for both, builds fine.
> 
> Only for my private DT overlay files that I use directly with dtc I
> couldn't adopt that style.
> 
The doc states:

If a specific tool cannot handle the standard comment style, then the
appropriate comment mechanism which the tool accepts shall be used. This
is the reason for having the "/\* \*/" style comment in C header
files.

I interpreted that as dtc doesn't handle // comments, use /**/

But I agree it also states:
.dts{i}:  // SPDX-License-Identifier: 

So I think we will end up with a mix of both.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-19 Thread Alexandre Belloni
On 17/12/2017 at 16:28:44 -0800, Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
> 
> Move those braces to column 1.
> 
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
> 
> Miscellanea:
> 
> o Remove extra trailing ; and blank line from xfs_agf_verify
> 
> Signed-off-by: Joe Perches <j...@perches.com>

For RTC:

Acked-by: Alexandre Belloni <alexandre.bell...@free-electrons.com>


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/atmel-hlcdc: Fix output initialization

2017-05-18 Thread Alexandre Belloni
On 18/05/2017 at 14:35:21 +0200, Boris Brezillon wrote:
> drm_of_find_panel_or_bridge() is expecting np to point to the encoder
> node, not the bridge or panel this encoder is feeding.
> Moreover, the endpoint parameter passed to drm_of_find_panel_or_bridge()
> is always set to zero, which prevents us from probing all outputs.
> 
> We also move the atmel_hlcdc_rgb_output allocation after the
> panel/bridge detection to avoid useless allocations.
> 
> Reported-by: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Tested-by: Alexandre Belloni <alexandre.bell...@free-electrons.com>

> Fixes: ebc944613567 ("drm: convert drivers to use 
> drm_of_find_panel_or_bridge")
> Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com>
> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 36 
> +---
>  1 file changed, 14 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c 
> b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> index 65a3bd7a0c00..423dda2785d4 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> @@ -152,8 +152,7 @@ static const struct drm_connector_funcs 
> atmel_hlcdc_panel_connector_funcs = {
>   .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
>  };
>  
> -static int atmel_hlcdc_attach_endpoint(struct drm_device *dev,
> -const struct device_node *np)
> +static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
>  {
>   struct atmel_hlcdc_dc *dc = dev->dev_private;
>   struct atmel_hlcdc_rgb_output *output;
> @@ -161,6 +160,11 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device 
> *dev,
>   struct drm_bridge *bridge;
>   int ret;
>  
> + ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
> +   , );
> + if (ret)
> + return ret;
> +
>   output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL);
>   if (!output)
>   return -EINVAL;
> @@ -177,10 +181,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device 
> *dev,
>  
>   output->encoder.possible_crtcs = 0x1;
>  
> - ret = drm_of_find_panel_or_bridge(np, 0, 0, , );
> - if (ret)
> - return ret;
> -
>   if (panel) {
>   output->connector.dpms = DRM_MODE_DPMS_OFF;
>   output->connector.polled = DRM_CONNECTOR_POLL_CONNECT;
> @@ -220,22 +220,14 @@ static int atmel_hlcdc_attach_endpoint(struct 
> drm_device *dev,
>  
>  int atmel_hlcdc_create_outputs(struct drm_device *dev)
>  {
> - struct device_node *remote;
> - int ret = -ENODEV;
> - int endpoint = 0;
> -
> - while (true) {
> - /* Loop thru possible multiple connections to the output */
> - remote = of_graph_get_remote_node(dev->dev->of_node, 0,
> -   endpoint++);
> - if (!remote)
> - break;
> -
> - ret = atmel_hlcdc_attach_endpoint(dev, remote);
> - of_node_put(remote);
> - if (ret)
> - return ret;
> - }
> + int endpoint, ret = 0;
> +
> + for (endpoint = 0; !ret; endpoint++)
> + ret = atmel_hlcdc_attach_endpoint(dev, endpoint);
> +
> + /* At least one device was successfully attached.*/
> + if (ret == -ENODEV && endpoint)
> + return 0;
>  
>   return ret;
>  }
> -- 
> 2.7.4
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 0/8] ARM: sun8i: a33: Mali improvements

2017-02-17 Thread Alexandre Belloni
On 17/02/2017 at 13:45:44 +0100, Tobias Jakobi wrote:
> > The device tree is a representation of the hardware itself. The state
> > of the driver support doesn't change the hardware you're running on,
> > just like your BIOS/UEFI on x86 won't change the device it reports to
> > Linux based on whether it has a driver for it.
> Like Emil already said, the new bindings and the DT entries are solely
> introduced to support a proprietary out-of-tree module.
> 

Because device tree describes the hardware, the added binding doesn't
support any particular module. The eventually upstreamed drvier will
share the same bindings.

> The current workflow when introducing new DT entries is the following:
> - upstream a driver that uses the entries
> - THEN add the new entries
> 

Exactly not, if you do that, checkpatch will complain loudly. Because
you must not add a driver using bindings that are not documented first.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v5 1/2] drm/bridge: Add sii902x driver

2016-06-03 Thread Alexandre Belloni
Hi,

On 03/06/2016 at 10:38:49 +0100, Emil Velikov wrote :
> On 2 June 2016 at 16:00, Boris Brezillon
>  wrote:
> > +
> > +   if (client->irq > 0) {
> I was always confused which is the correct way to check this >= 0 vs >
> 0. DRM has both :-\
> Do you have any suggestions, should be 'mass convert' DRM to use only
> one of the two ?
> 

0 is an invalid irq number for any i2c devices since
  dab472eb931bc2916fa779e56deccd0ec319cf5b.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH v4 2/2] drm: panel: simple: add QiaoDian qd43003c0-40

2015-12-16 Thread Alexandre Belloni
Hi,

On 16/12/2015 at 18:14:06 +0100, Thierry Reding wrote :
> Also, please use "drm/panel: " as the prefix (instead of "drm: panel: ")
> to make it easier for me to pick up things. I was about to send out a
> pull request for drm/panel when I noticed that there was this patch. The
> v4 wasn't Cc: dri-devel, so I ended up applying v3 from patchwork. From
> the changelog it seems like that's okay, though.
> 

I think v3 didn't have the documentation at the correct place, this
should be:
Documentation/devicetree/bindings/display/panel/qiaodian,qd43003c0-40.txt



-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH v2] MAINTAINERS: add a maintainer for the atmel-hlcdc DRM driver

2015-10-15 Thread Alexandre Belloni
On 13/10/2015 at 11:55:42 +0200, Boris Brezillon wrote :
> Add myself as the maintainer of the atmel-hlcdc DRM driver.
> 
> Signed-off-by: Boris Brezillon 
> Acked-by: Nicolas Ferre 
Acked-by: Alexandre Belloni 


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH] MAINTAINERS: add maintainer for the atmel-hlcdc DRM driver

2015-10-10 Thread Alexandre Belloni
On 09/10/2015 at 22:37:33 +0200, Boris Brezillon wrote :
> Add myself as the maintainer of the atmel-hlcdc DRM driver.
> 
> Signed-off-by: Boris Brezillon 
> ---
>  MAINTAINERS | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 797236b..11173b5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3591,6 +3591,13 @@ F: drivers/gpu/drm/i915/
>  F:   include/drm/i915*
>  F:   include/uapi/drm/i915*
>  
> +DRM DRIVERS FOR ATMEL_AT91

I would remove AT91


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH v3 2/2] drm: panel: simple: add QiaoDian qd43003c0-40

2015-10-08 Thread Alexandre Belloni
From: Josh Wu <josh...@atmel.com>

The QiaoDian Xianshi QD43003C0-40 is a 4"3 TFT LCD panel.

Timings from the OTA5180A document, ver 0.9, section
10.1.1:
  http://www.orientdisplay.com/pdf/OTA5180A.pdf

Signed-off-by: Josh Wu 
Signed-off-by: Alexandre Belloni 
---
 .../bindings/panel/qiaodian,qd43003c0-40.txt   |  7 ++
 drivers/gpu/drm/panel/panel-simple.c   | 27 ++
 2 files changed, 34 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/panel/qiaodian,qd43003c0-40.txt

diff --git a/Documentation/devicetree/bindings/panel/qiaodian,qd43003c0-40.txt 
b/Documentation/devicetree/bindings/panel/qiaodian,qd43003c0-40.txt
new file mode 100644
index ..0fbdab89ac3d
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/qiaodian,qd43003c0-40.txt
@@ -0,0 +1,7 @@
+QiaoDian XianShi Corporation 4"3 TFT LCD panel
+
+Required properties:
+- compatible: should be "qiaodian,qd43003c0-40"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index f97b73ec4713..c93ffa615005 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1027,6 +1027,30 @@ static const struct panel_desc ortustech_com43h4m85ulc = 
{
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 };

+static const struct drm_display_mode qd43003c0_40_mode = {
+   .clock = 9000,
+   .hdisplay = 480,
+   .hsync_start = 480 + 8,
+   .hsync_end = 480 + 8 + 4,
+   .htotal = 480 + 8 + 4 + 39,
+   .vdisplay = 272,
+   .vsync_start = 272 + 4,
+   .vsync_end = 272 + 4 + 10,
+   .vtotal = 272 + 4 + 10 + 2,
+   .vrefresh = 60,
+};
+
+static const struct panel_desc qd43003c0_40 = {
+   .modes = _40_mode,
+   .num_modes = 1,
+   .bpc = 8,
+   .size = {
+   .width = 95,
+   .height = 53,
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+};
+
 static const struct drm_display_mode samsung_ltn101nt05_mode = {
.clock = 54030,
.hdisplay = 1024,
@@ -1182,6 +1206,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "ortustech,com43h4m85ulc",
.data = _com43h4m85ulc,
}, {
+   .compatible = "qiaodian,qd43003c0-40",
+   .data = _40,
+   }, {
.compatible = "samsung,ltn101nt05",
.data = _ltn101nt05,
}, {
-- 
2.1.4



[PATCH v3 1/2] of: Add vendor prefix for QiaoDian Xianshi

2015-10-08 Thread Alexandre Belloni
Use "qiaodian" as the vendor prefix for QiaoDian Xianshi Corporation in
device tree compatible strings.

Signed-off-by: Alexandre Belloni 
---

Changes in v3:
 -use qiaodian as the vendor prefix as preferred by Rob Herring

 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ac5f0c34ae00..d6402753fd9f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -174,6 +174,7 @@ qca Qualcomm Atheros, Inc.
 qcom   Qualcomm Technologies, Inc
 qemu   QEMU, a generic and open source machine emulator and virtualizer
 qi Qi Hardware
+qiaodian   QiaoDian XianShi Corporation
 qnap   QNAP Systems, Inc.
 radxa  Radxa
 raidsonic  RaidSonic Technology GmbH
-- 
2.1.4



[PATCH 1/2] of: Add vendor prefix for QiaoDian Xianshi

2015-10-01 Thread Alexandre Belloni
On 30/09/2015 at 17:16:10 -0500, Rob Herring wrote :
> On Wed, Sep 30, 2015 at 4:42 PM, Alexandre Belloni
>  wrote:
> > Use "qiaodian" as the vendor prefix for QiaoDian Xianshi Corporation in
> > device tree compatible strings.
> >
> > Signed-off-by: Alexandre Belloni 
> > ---
> >  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
> > b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > index ac5f0c34ae00..76579e2ef162 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > @@ -174,6 +174,7 @@ qca Qualcomm Atheros, Inc.
> >  qcom   Qualcomm Technologies, Inc
> >  qemu   QEMU, a generic and open source machine emulator and virtualizer
> >  qi Qi Hardware
> > +qd QiaoDian XianShi Corporation
> 
> Doesn't match the commit msg...
> 

Yeah, I was not sure which one I should use actually, is "qd"
sufficient? I couldn't find much information on the company, I chose to
use the prefix they use for their parts.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH 2/2] drm: panel: simple: add QiaoDian qd43003c0-40

2015-10-01 Thread Alexandre Belloni
And I forgot to add that this is V2, I've just added .bpc.

On 30/09/2015 at 23:42:17 +0200, Alexandre Belloni wrote :
> From: Josh Wu 
> 
> The QiaoDian Xianshi QD43003C0-40 is a 4"3 TFT LCD panel.
> 
> Timings from the OTA5180A document, ver 0.9, section
> 10.1.1:
>   http://www.orientdisplay.com/pdf/OTA5180A.pdf
> 
> Signed-off-by: Josh Wu 
> Signed-off-by: Alexandre Belloni 
> ---
>  .../devicetree/bindings/panel/qd,qd43003c0-40.txt  |  7 ++
>  drivers/gpu/drm/panel/panel-simple.c   | 27 
> ++
>  2 files changed, 34 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
> 
> diff --git a/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt 
> b/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
> new file mode 100644
> index ..900bc6ebeaff
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
> @@ -0,0 +1,7 @@
> +QiaoDian XianShi Corporation 4"3 TFT LCD panel
> +
> +Required properties:
> +- compatible: should be "qd,qd43003c0-40"
> +
> +This binding is compatible with the simple-panel binding, which is specified
> +in simple-panel.txt in this directory.
> diff --git a/drivers/gpu/drm/panel/panel-simple.c 
> b/drivers/gpu/drm/panel/panel-simple.c
> index f97b73ec4713..667cac37d2e5 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -1027,6 +1027,30 @@ static const struct panel_desc ortustech_com43h4m85ulc 
> = {
>   .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
>  };
>  
> +static const struct drm_display_mode qd43003c0_40_mode = {
> + .clock = 9000,
> + .hdisplay = 480,
> + .hsync_start = 480 + 8,
> + .hsync_end = 480 + 8 + 4,
> + .htotal = 480 + 8 + 4 + 39,
> + .vdisplay = 272,
> + .vsync_start = 272 + 4,
> + .vsync_end = 272 + 4 + 10,
> + .vtotal = 272 + 4 + 10 + 2,
> + .vrefresh = 60,
> +};
> +
> +static const struct panel_desc qd43003c0_40 = {
> + .modes = _40_mode,
> + .num_modes = 1,
> + .bpc = 8,
> + .size = {
> + .width = 95,
> + .height = 53,
> + },
> + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> +};
> +
>  static const struct drm_display_mode samsung_ltn101nt05_mode = {
>   .clock = 54030,
>   .hdisplay = 1024,
> @@ -1182,6 +1206,9 @@ static const struct of_device_id platform_of_match[] = {
>   .compatible = "ortustech,com43h4m85ulc",
>   .data = _com43h4m85ulc,
>   }, {
> + .compatible = "qd,qd43003c0-40",
> + .data = _40,
> + }, {
>   .compatible = "samsung,ltn101nt05",
>   .data = _ltn101nt05,
>   }, {
> -- 
> 2.1.4
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH 2/2] drm: panel: simple: add QiaoDian qd43003c0-40

2015-10-01 Thread Alexandre Belloni
From: Josh Wu <josh...@atmel.com>

The QiaoDian Xianshi QD43003C0-40 is a 4"3 TFT LCD panel.

Timings from the OTA5180A document, ver 0.9, section
10.1.1:
  http://www.orientdisplay.com/pdf/OTA5180A.pdf

Signed-off-by: Josh Wu 
Signed-off-by: Alexandre Belloni 
---
 .../devicetree/bindings/panel/qd,qd43003c0-40.txt  |  7 ++
 drivers/gpu/drm/panel/panel-simple.c   | 27 ++
 2 files changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt

diff --git a/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt 
b/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
new file mode 100644
index ..900bc6ebeaff
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
@@ -0,0 +1,7 @@
+QiaoDian XianShi Corporation 4"3 TFT LCD panel
+
+Required properties:
+- compatible: should be "qd,qd43003c0-40"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index f97b73ec4713..667cac37d2e5 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1027,6 +1027,30 @@ static const struct panel_desc ortustech_com43h4m85ulc = 
{
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 };

+static const struct drm_display_mode qd43003c0_40_mode = {
+   .clock = 9000,
+   .hdisplay = 480,
+   .hsync_start = 480 + 8,
+   .hsync_end = 480 + 8 + 4,
+   .htotal = 480 + 8 + 4 + 39,
+   .vdisplay = 272,
+   .vsync_start = 272 + 4,
+   .vsync_end = 272 + 4 + 10,
+   .vtotal = 272 + 4 + 10 + 2,
+   .vrefresh = 60,
+};
+
+static const struct panel_desc qd43003c0_40 = {
+   .modes = _40_mode,
+   .num_modes = 1,
+   .bpc = 8,
+   .size = {
+   .width = 95,
+   .height = 53,
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+};
+
 static const struct drm_display_mode samsung_ltn101nt05_mode = {
.clock = 54030,
.hdisplay = 1024,
@@ -1182,6 +1206,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "ortustech,com43h4m85ulc",
.data = _com43h4m85ulc,
}, {
+   .compatible = "qd,qd43003c0-40",
+   .data = _40,
+   }, {
.compatible = "samsung,ltn101nt05",
.data = _ltn101nt05,
}, {
-- 
2.1.4



[PATCH 1/2] of: Add vendor prefix for QiaoDian Xianshi

2015-10-01 Thread Alexandre Belloni
Use "qiaodian" as the vendor prefix for QiaoDian Xianshi Corporation in
device tree compatible strings.

Signed-off-by: Alexandre Belloni 
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ac5f0c34ae00..76579e2ef162 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -174,6 +174,7 @@ qca Qualcomm Atheros, Inc.
 qcom   Qualcomm Technologies, Inc
 qemu   QEMU, a generic and open source machine emulator and virtualizer
 qi Qi Hardware
+qd QiaoDian XianShi Corporation
 qnap   QNAP Systems, Inc.
 radxa  Radxa
 raidsonic  RaidSonic Technology GmbH
-- 
2.1.4



[PATCH] drm: panel: simple: add QiaoDian qd43003c0-40

2015-08-17 Thread Alexandre Belloni
On 17/08/2015 at 12:09:14 +0200, Thierry Reding wrote :
> On Sat, Aug 01, 2015 at 12:44:31AM +0200, Alexandre Belloni wrote:
> > From: Josh Wu 
> > 
> > The QiaoDian Xianshi QD43003C0-40 is a 4"3 TFT LCD panel.
> > 
> > Timings from the OTA5180A document, ver 0.9, section
> > 10.1.1:
> >   http://www.orientdisplay.com/pdf/OTA5180A.pdf
> > 
> > Signed-off-by: Josh Wu 
> > Signed-off-by: Alexandre Belloni 
> > ---
> >  .../devicetree/bindings/panel/qd,qd43003c0-40.txt  |  7 ++
> >  drivers/gpu/drm/panel/panel-simple.c   | 26 
> > ++
> >  2 files changed, 33 insertions(+)
> >  create mode 100644 
> > Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
> 
> You didn't run this through scripts/get_maintainer.pl, did you? It would
> also help to use the standard prefix ("drm/panel: ") because I end up
> filtering for that occasionally in case somebody didn't Cc me on panel
> patches.
> 

I'm pretty sure I did as you were the only one in the To: field.
Maybe you want to check your spam filter.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


[PATCH] drm: panel: simple: add QiaoDian qd43003c0-40

2015-08-01 Thread Alexandre Belloni
From: Josh Wu <josh...@atmel.com>

The QiaoDian Xianshi QD43003C0-40 is a 4"3 TFT LCD panel.

Timings from the OTA5180A document, ver 0.9, section
10.1.1:
  http://www.orientdisplay.com/pdf/OTA5180A.pdf

Signed-off-by: Josh Wu 
Signed-off-by: Alexandre Belloni 
---
 .../devicetree/bindings/panel/qd,qd43003c0-40.txt  |  7 ++
 drivers/gpu/drm/panel/panel-simple.c   | 26 ++
 2 files changed, 33 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt

diff --git a/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt 
b/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
new file mode 100644
index ..900bc6ebeaff
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/qd,qd43003c0-40.txt
@@ -0,0 +1,7 @@
+QiaoDian XianShi Corporation 4"3 TFT LCD panel
+
+Required properties:
+- compatible: should be "qd,qd43003c0-40"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index f94201b6e882..e688fa545ae3 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -967,6 +967,29 @@ static const struct panel_desc ortustech_com43h4m85ulc = {
.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 };

+static const struct drm_display_mode qd43003c0_40_mode = {
+   .clock = 9000,
+   .hdisplay = 480,
+   .hsync_start = 480 + 8,
+   .hsync_end = 480 + 8 + 4,
+   .htotal = 480 + 8 + 4 + 39,
+   .vdisplay = 272,
+   .vsync_start = 272 + 4,
+   .vsync_end = 272 + 4 + 10,
+   .vtotal = 272 + 4 + 10 + 2,
+   .vrefresh = 60,
+};
+
+static const struct panel_desc qd43003c0_40 = {
+   .modes = _40_mode,
+   .num_modes = 1,
+   .size = {
+   .width = 95,
+   .height = 53,
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+};
+
 static const struct drm_display_mode samsung_ltn101nt05_mode = {
.clock = 54030,
.hdisplay = 1024,
@@ -1116,6 +1139,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "ortustech,com43h4m85ulc",
.data = _com43h4m85ulc,
}, {
+   .compatible = "qd,qd43003c0-40",
+   .data = _40,
+   }, {
.compatible = "samsung,ltn101nt05",
.data = _ltn101nt05,
}, {
-- 
2.1.4



[PATCH v2 2/7] pwm: add support for atmel-hlcdc-pwm device

2014-06-13 Thread Alexandre Belloni
(hlcdc->regmap, ATMEL_HLCDC_SR, ) &&
> +!(status & ATMEL_HLCDC_PWM))
> + cpu_relax();
> +

I'm not sure you have to wait here, it will be enabled at some point,
that is enough.

> + return 0;
> +}
> +
> +static void atmel_hlcdc_pwm_disable(struct pwm_chip *c,
> + struct pwm_device *pwm)
> +{
> + struct atmel_hlcdc_pwm_chip *chip =
> + pwm_chip_to_atmel_hlcdc_pwm_chip(c);
> + struct atmel_hlcdc *hlcdc = chip->hlcdc;
> + u32 status;
> +
> + regmap_write(hlcdc->regmap, ATMEL_HLCDC_DIS, ATMEL_HLCDC_PWM);
> + while (!regmap_read(hlcdc->regmap, ATMEL_HLCDC_SR, ) &&
> +(status & ATMEL_HLCDC_PWM))
> + cpu_relax();

Ditto

> +}
> +
> +static const struct pwm_ops atmel_hlcdc_pwm_ops = {
> + .config = atmel_hlcdc_pwm_config,
> + .set_polarity = atmel_hlcdc_pwm_set_polarity,
> + .enable = atmel_hlcdc_pwm_enable,
> + .disable = atmel_hlcdc_pwm_disable,
> + .owner = THIS_MODULE,
> +};
> +
> +static int atmel_hlcdc_pwm_probe(struct platform_device *pdev)
> +{
> + struct atmel_hlcdc_pwm_chip *chip;
> + struct device *dev = >dev;
> + int ret;
> +
> + chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
> + if (!chip)
> + return -ENOMEM;
> +
> + chip->hlcdc = dev_get_drvdata(dev->parent);
> + chip->chip.ops = _hlcdc_pwm_ops;
> + chip->chip.dev = dev;
> + chip->chip.base = -1;
> + chip->chip.npwm = 1;
> + chip->chip.of_xlate = of_pwm_xlate_with_flags;
> + chip->chip.of_pwm_n_cells = 3;
> + chip->chip.can_sleep = 1;
> +
> + ret = pwmchip_add(>chip);
> + if (ret)
> + return ret;
> +
> + platform_set_drvdata(pdev, chip);
> +
> + return 0;
> +}
> +
> +static int atmel_hlcdc_pwm_remove(struct platform_device *pdev)
> +{
> + struct atmel_hlcdc_pwm_chip *chip = platform_get_drvdata(pdev);
> +
> + return pwmchip_remove(>chip);
> +}
> +
> +static const struct of_device_id atmel_hlcdc_pwm_dt_ids[] = {
> + { .compatible = "atmel,hlcdc-pwm" },
> + { /* sentinel */ },
> +};
> +
> +static struct platform_driver atmel_hlcdc_pwm_driver = {
> + .driver = {
> + .name = "atmel-hlcdc-pwm",
> + .of_match_table = atmel_hlcdc_pwm_dt_ids,
> + },
> + .probe = atmel_hlcdc_pwm_probe,
> + .remove = atmel_hlcdc_pwm_remove,
> +};
> +module_platform_driver(atmel_hlcdc_pwm_driver);
> +
> +MODULE_ALIAS("platform:atmel-hlcdc-pwm");
> +MODULE_AUTHOR("Boris Brezillon ");
> +MODULE_DESCRIPTION("Atmel HLCDC PWM driver");
> +MODULE_LICENSE("GPL");
> -- 
> 1.8.3.2
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com