1. 31 10月, 2017 1 次提交
  2. 30 10月, 2017 1 次提交
    • L
      gpio-mmio: Use the new .get_multiple() callback · 80057cb4
      Linus Walleij 提交于
      It is possible to read all lines of a generic MMIO GPIO chip
      with a single register read so support this if we are in
      native endianness.
      
      Add an especially quirky callback to read multiple lines for
      the variants that require you to read values from the
      output registers if and only if the line is set as output.
      We managed to do that with a maximum of two register reads,
      and just one read if the requested lines are all input or all
      output.
      
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Lukas Wunner <lukas@wunner.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      80057cb4
  3. 25 10月, 2017 6 次提交
    • L
      gpio: mmio: Make pin2mask() a private business · 24efd94b
      Linus Walleij 提交于
      The vtable call pin2mask() was introducing a vtable function call
      in every gpiochip callback for a generic MMIO GPIO chip. This was
      not exactly efficient. (Maybe link-time optimization could get rid of
      it, I don't know.)
      
      After removing all external calls into this API we can make it a
      boolean flag in the struct gpio_chip call and sink the function into
      the gpio-mmio driver yielding encapsulation and potential speedups.
      
      Cc: Anton Vorontsov <anton@enomsg.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      24efd94b
    • L
      gpio: mpc8xxx: Do not reverse bits using bgpio · b3222f71
      Linus Walleij 提交于
      The MPC8xxx driver is always instantiating its generic GPIO functions
      with the flag BGPIOF_BIG_ENDIAN. This means "big-endian bit order"
      and means the bits representing the GPIO lines in the registers are
      reversed around 31 bits so line 0 is at bit 31 and so forth down to
      line 31 in bit 0.
      
      Instead of looping into the generic MMIO gpio to do the simple
      calculation of a bitmask, through a vtable call with two parameters
      likely using stack frames etc (unless the compiler optimize it)
      and obscuring the view for the programmer, let's just open-code
      what the call does. This likely executes faster, saves space and
      makes the code easier to read.
      
      Cc: Liu Gang <Gang.Liu@nxp.com>
      Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      b3222f71
    • L
      gpio: brcmstb: Do not use gc->pin2mask() · d7442368
      Linus Walleij 提交于
      The pin2mask() accessor only shuffles BIT ORDER in big endian systems,
      i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or
      bit 15 or bit 31 or so.
      
      The brcmstb only uses big endian BYTE ORDER which will be taken car of
      by the ->write_reg() callback.
      
      Just use BIT(offset) to assign the bit.
      Acked-by: NGregory Fong <gregory.0xf0@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      d7442368
    • L
      gpio: grgpio: Do not use gc->pin2mask() · 5c7b0c4e
      Linus Walleij 提交于
      The pin2mask() accessor only shuffles BIT ORDER in big endian systems,
      i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or
      bit 15 or bit 31 or so.
      
      The grgpio only uses big endian BYTE ORDER which will be taken car of
      by the ->write_reg() callback.
      
      Just use BIT(offset) to assign the bit.
      Acked-by: NAndreas Larsson <andreas@gaisler.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5c7b0c4e
    • L
      gpio: loongson1: fix bgpio usage · fe29416b
      Linus Walleij 提交于
      When no flags are given, the native endianness is used to access
      the MMIO registers, and the pin2mask() call can simply be
      converted to a BIT() call, as per the default pin2mask()
      implementation in gpio-mmio.c.
      
      Cc: Kelvin Cheung <keguang.zhang@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      fe29416b
    • L
      gpio: dwapb: fix bgpio usage · d97a1b56
      Linus Walleij 提交于
      The DW APB GPIO driver uses the generic GPIO library gpio-mmio,
      and initialize the flags as "false", which should be 0.
      
      When no flags are given, the native endianness is used to access
      the MMIO registers, and the pin2mask() call can simply be
      converted to a BIT() call, as per the default pin2mask()
      implementation in gpio-mmio.c.
      Acked-by: NAlan Tull <atull@kernel.org>
      Acked-by: NHoan Tran <hotran@apm.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      d97a1b56
  4. 23 10月, 2017 2 次提交
  5. 20 10月, 2017 15 次提交
  6. 08 10月, 2017 1 次提交
  7. 07 10月, 2017 1 次提交
  8. 06 10月, 2017 1 次提交
  9. 04 10月, 2017 2 次提交
    • L
      gpio: Alter semantics of *raw* operations to actually be raw · 02e47980
      Linus Walleij 提交于
      Currently calls to:
      gpiod_direction_output_raw()
      gpiod_set_raw_value()
      gpiod_set_raw_array_value()
      gpiod_set_raw_value_cansleep()
      gpiod_set_raw_array_value_cansleep()
      
      Respect that we do not want to invert the value written, but will
      still apply special open drain/open source semantics if the line has
      an open drain/open source flag.
      
      It also forbids us from driving an output marked as an interrupt
      line.
      
      This does not fit with the function name and expected semantics. In
      the w1 host driver (for example) we need to handle a line as open drain
      but sometimes force it to pull up, which means we should be able to
      use the gpiod_set_raw_value() for this, but it currently does not
      work.
      
      There are also use cases where users actually want to drive a line
      used by an interrupt. This is what they should be expected to use
      the *raw* accessors for.
      
      I have looked over the current users of this API and they do not seem
      to be using the *raw* accessors with open drain or open source so let's
      augment this behaviour before we have users expecting the inconsistent
      semantic.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      02e47980
    • L
      gpio: Get rid of _prefix and __prefixes · fac9d885
      Linus Walleij 提交于
      The arbitrarily marking of a function with _ or __ is taking to mean
      "perform some inner core of the caller" or something like that. At other
      times, this syntax has a totally different meaning.
      
      I don't like this since it is unambious and unhelpful to people reading
      the code, so replace it with _commit() suffixes.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      fac9d885
  10. 22 9月, 2017 1 次提交
  11. 21 9月, 2017 2 次提交
  12. 19 9月, 2017 3 次提交
  13. 17 9月, 2017 4 次提交
    • L
      Linux 4.14-rc1 · 2bd6bf03
      Linus Torvalds 提交于
      2bd6bf03
    • L
      Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs · 194a4ef9
      Linus Torvalds 提交于
      Pull UBI updates from Richard Weinberger:
       "Minor improvements"
      
      * tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs:
        UBI: Fix two typos in comments
        ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"
        ubi: pr_err() strings should end with newlines
        ubi: pr_err() strings should end with newlines
        ubi: pr_err() strings should end with newlines
      194a4ef9
    • L
      Merge branch 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 2896b80e
      Linus Torvalds 提交于
      Pull UML updates from Richard Weinberger:
      
       - minor improvements
      
       - fixes for Debian's new gcc defaults (pie enabled by default)
      
       - fixes for XSTATE/XSAVE to make UML work again on modern systems
      
      * 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: return negative in tuntap_open_tramp()
        um: remove a stray tab
        um: Use relative modversions with LD_SCRIPT_DYN
        um: link vmlinux with -no-pie
        um: Fix CONFIG_GCOV for modules.
        Fix minor typos and grammar in UML start_up help
        um: defconfig: Cleanup from old Kconfig options
        um: Fix FP register size for XSTATE/XSAVE
      2896b80e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 48bddb14
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger.
      
       2) Fix double-free in rmnet driver, from Dan Carpenter.
      
       3) INET connection socket layer can double put request sockets, fix
          from Eric Dumazet.
      
       4) Don't match collect metadata-mode tunnels if the device is down,
          from Haishuang Yan.
      
       5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in
          be2net driver, from Suresh Reddy.
      
       6) Fix scaling error in gen_estimator, from Eric Dumazet.
      
       7) Fix 64-bit statistics deadlock in systemport driver, from Florian
          Fainelli.
      
       8) Fix use-after-free in sctp_sock_dump, from Xin Long.
      
       9) Reject invalid BPF_END instructions in verifier, from Edward Cree.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
        mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
        Documentation: link in networking docs
        tcp: fix data delivery rate
        bpf/verifier: reject BPF_ALU64|BPF_END
        sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
        sctp: fix an use-after-free issue in sctp_sock_dump
        netvsc: increase default receive buffer size
        tcp: update skb->skb_mstamp more carefully
        net: ipv4: fix l3slave check for index returned in IP_PKTINFO
        net: smsc911x: Quieten netif during suspend
        net: systemport: Fix 64-bit stats deadlock
        net: vrf: avoid gcc-4.6 warning
        qed: remove unnecessary call to memset
        tg3: clean up redundant initialization of tnapi
        tls: make tls_sw_free_resources static
        sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
        MAINTAINERS: review Renesas DT bindings as well
        net_sched: gen_estimator: fix scaling error in bytes/packets samples
        nfp: wait for the NSP resource to appear on boot
        nfp: wait for board state before talking to the NSP
        ...
      48bddb14