1. 11 8月, 2016 6 次提交
    • L
      video: ARM CLCD: add special board and panel hooks for Nomadik · 1d3f0cbe
      Linus Walleij 提交于
      In the .board_init() callback will set up a mux register in
      the Nomadik system controller. It so happens that the platform
      has two display output engines, and we have to poke a bit in
      a special register to make sure the right engine is muxed in
      as they are mutually exclusive.
      
      The Nomadik CLCD variant is instantiated on a platform where
      it is combined with a 800x480 TPO WVGA display. In the
      .panel_init() hook we will detect this display from the
      compatible string and set it up. We also add .enable() and
      .disable() callbacks for it as the sleep state is software
      controlled.
      
      The display is connected with a special 3-wire serial bus
      (this is sadly neither I2C or SPI) using three GPIO lines that
      we bitbang to detect the display and enable/disable sleep
      state.
      
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1d3f0cbe
    • L
      video: ARM CLCD: support Nomadik variant · 046ad6cd
      Linus Walleij 提交于
      The Nomadik variant has a few special quirks that need to be respected
      to make the driver work:
      
      - The block need to be clocked during writing of the TIMn registers
        or the bus will stall.
      - Special bits in the control register select how many of the output
        display lines get activated.
      - Special bits in the control register select how to manage the
        different 565 and 5551 modes.
      - There is a packed 24bit graphics mode, i.e 888 pixels can be stored
        in memory is three consecutive bytes, not evenly aligned to a 32bit
        word.
      
      This patch uses the vendor data pointer from the AMBA matching mechanism
      to track the quirks for this variant, and adds two hooks that variants
      can use to initialize boards and panels during start-up. These will
      later be used to adopt a Nomadik board profile.
      
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      046ad6cd
    • L
      video: ARM CLCD: support pads connected in reverse order · 03d14c36
      Linus Walleij 提交于
      There are CLCDs connected with the pads in BGR rather than RGB
      order. It really doesn't matter since the CLCD has a flag and
      a bit to switch the position of the RGB and BGR components.
      This is needed to put something logical into the
      arm,pl11x,tft-r0g0b0-pads property of the device tree on the
      Nomadik which will then be <16 8 0>.
      
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      03d14c36
    • L
      video: ARM CLCD: support DT signal inversion flags · af29897f
      Linus Walleij 提交于
      The device tree bindings from display-timing.txt allows us to
      specify if data enable, hsync, vsync or the pixed clock should be
      inverted on the way to the display. The driver does not currently
      handle this so add support for those flags as it is needed for
      the Versatile Sanyo LCD display.
      
      Note that the previous behaviour was to invert the pixel clock
      for all displays, so unless the pixel clock polarity is
      explicitly defined in the device tree (i.e. the timings node
      has the "pixelclk-active" property) we fall back to inverting
      the pixel clock. This needs some extra compatibility code.
      
      Since the timing flags have to be set up inside the struct
      clcd_panel, we need to refactor the code a bit to pass around
      the panel rather than just the mode.
      
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      af29897f
    • L
      video: ARM CLCD: backlight support for OF · c38162be
      Linus Walleij 提交于
      If the device is probed from device tree, we can support
      backlight. This is used with some systems such as the
      ST Microelectronics Nomadik.
      
      We have to add HAS_IOMEM to the dependencies of CLCD since
      the backlight class device will now be selected, and if it
      gets selected on an arch that does not have IOMEM,
      compilation will fail.
      
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c38162be
    • M
      omapfb: Fix regulator API abuse in dss.c and hdmi4/5.c · 1d1e56f4
      Mark Brown 提交于
      The voltage changing code in this driver is broken and should be
      removed.  The driver sets a single, exact voltage on probe.  Unless
      there is a very good reason for this (which should be documented in
      comments) constraints like this need to be set via the machine
      constraints, voltage setting in a driver is expected to be used in cases
      where the voltage varies at runtime.
      
      In addition client drivers should almost never be calling
      regulator_can_set_voltage(), if the device needs to set a voltage it
      needs to set the voltage and the regulator core will handle the case
      where the regulator is fixed voltage.  If the driver can skip setting
      the voltage it should just never set the voltage.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      [tomi.valkeinen@ti.com: fix abuse in hdmi5.c too]
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1d1e56f4
  2. 04 8月, 2016 1 次提交
    • K
      dma-mapping: use unsigned long for dma_attrs · 00085f1e
      Krzysztof Kozlowski 提交于
      The dma-mapping core and the implementations do not change the DMA
      attributes passed by pointer.  Thus the pointer can point to const data.
      However the attributes do not have to be a bitfield.  Instead unsigned
      long will do fine:
      
      1. This is just simpler.  Both in terms of reading the code and setting
         attributes.  Instead of initializing local attributes on the stack
         and passing pointer to it to dma_set_attr(), just set the bits.
      
      2. It brings safeness and checking for const correctness because the
         attributes are passed by value.
      
      Semantic patches for this change (at least most of them):
      
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
      
          @@
          f(...,
          - struct dma_attrs *attrs
          + unsigned long attrs
          , ...)
          {
          ...
          }
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      and
      
          // Options: --all-includes
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
          type t;
      
          @@
          t f(..., struct dma_attrs *attrs);
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.comSigned-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Acked-by: NHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
      Acked-by: Mark Salter <msalter@redhat.com> [c6x]
      Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris]
      Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm]
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp]
      Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core]
      Acked-by: David Vrabel <david.vrabel@citrix.com> [xen]
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb]
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon]
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
      Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
      Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32]
      Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc]
      Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00085f1e
  3. 03 8月, 2016 2 次提交
  4. 27 7月, 2016 1 次提交
  5. 06 7月, 2016 1 次提交
  6. 29 6月, 2016 1 次提交
  7. 26 6月, 2016 4 次提交
    • J
      tty: vt, convert more macros to functions · 6ca8dfd7
      Jiri Slaby 提交于
      Namely convert:
      * IS_FG -> con_is_fg
      * DO_UPDATE -> con_should_update
      * CON_IS_VISIBLE -> con_is_visible
      
      DO_UPDATE was a weird name for a yes/no answer, so the new name is
      con_should_update.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: linux-usb@vger.kernel.org
      Cc: linux-fbdev@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ca8dfd7
    • J
      tty: vt, remove consw->con_bmove · 52ad1f38
      Jiri Slaby 提交于
      It is never called since commit 81732c3b (tty vt: Fix line
      garbage in virtual console on command line edition) in 3.7. So remove
      all the callbacks.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: linux-usb@vger.kernel.org
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      52ad1f38
    • J
      tty: vt, consw->con_set_palette cleanup · 709280da
      Jiri Slaby 提交于
      * allow NULL consw->con_set_palette (some consoles define an empty
        hook)
      * => remove empty hooks now
      * return value of consw->con_set_palette is never checked => make the
        function void
      * document consw->con_set_palette a bit
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: linux-usb@vger.kernel.org
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      709280da
    • J
      tty: vt, consw->con_scrolldelta cleanup · 97293de9
      Jiri Slaby 提交于
      * allow NULL consw->con_scrolldelta (some consoles define an empty
        hook)
      * => remove empty hooks now
      * return value of consw->con_scrolldelta is never checked => make the
        function void
      * document consw->con_scrolldelta a bit
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: linux-usb@vger.kernel.org
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      97293de9
  8. 03 6月, 2016 14 次提交
  9. 31 5月, 2016 2 次提交
  10. 28 5月, 2016 1 次提交
    • A
      remove lots of IS_ERR_VALUE abuses · 287980e4
      Arnd Bergmann 提交于
      Most users of IS_ERR_VALUE() in the kernel are wrong, as they
      pass an 'int' into a function that takes an 'unsigned long'
      argument. This happens to work because the type is sign-extended
      on 64-bit architectures before it gets converted into an
      unsigned type.
      
      However, anything that passes an 'unsigned short' or 'unsigned int'
      argument into IS_ERR_VALUE() is guaranteed to be broken, as are
      8-bit integers and types that are wider than 'unsigned long'.
      
      Andrzej Hajda has already fixed a lot of the worst abusers that
      were causing actual bugs, but it would be nice to prevent any
      users that are not passing 'unsigned long' arguments.
      
      This patch changes all users of IS_ERR_VALUE() that I could find
      on 32-bit ARM randconfig builds and x86 allmodconfig. For the
      moment, this doesn't change the definition of IS_ERR_VALUE()
      because there are probably still architecture specific users
      elsewhere.
      
      Almost all the warnings I got are for files that are better off
      using 'if (err)' or 'if (err < 0)'.
      The only legitimate user I could find that we get a warning for
      is the (32-bit only) freescale fman driver, so I did not remove
      the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
      For 9pfs, I just worked around one user whose calling conventions
      are so obscure that I did not dare change the behavior.
      
      I was using this definition for testing:
      
       #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \
             unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO))
      
      which ends up making all 16-bit or wider types work correctly with
      the most plausible interpretation of what IS_ERR_VALUE() was supposed
      to return according to its users, but also causes a compile-time
      warning for any users that do not pass an 'unsigned long' argument.
      
      I suggested this approach earlier this year, but back then we ended
      up deciding to just fix the users that are obviously broken. After
      the initial warning that caused me to get involved in the discussion
      (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
      asked me to send the whole thing again.
      
      [ Updated the 9p parts as per Al Viro  - Linus ]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: https://lkml.org/lkml/2016/1/7/363
      Link: https://lkml.org/lkml/2016/5/27/486
      Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # For nvmem part
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      287980e4
  11. 20 5月, 2016 2 次提交
  12. 17 5月, 2016 5 次提交