Commit graph

1123072 commits

Author SHA1 Message Date
Ashay Jaiswal
4df88fe5b6 spmi: pmic-arb: add support to dispatch interrupt based on IRQ status
Current implementation of SPMI arbiter dispatches interrupt based on the
Arbiter's accumulator status, in some cases the accumulator status may
remain zero and the interrupt remains un-handled. Add logic to dispatch
interrupts based Arbiter's IRQ status if the accumulator status is zero.

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/1655004286-11493-6-git-send-email-quic_fenglinw@quicinc.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220930005019.2663064-7-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:33:23 +02:00
David Collins
191adbdd26 spmi: pmic-arb: check apid against limits before calling irq handler
Check that the apid for an SPMI interrupt falls between the
min_apid and max_apid that can be handled by the APPS processor
before invoking the per-apid interrupt handler:
periph_interrupt().

This avoids an access violation in rare cases where the status
bit is set for an interrupt that is not owned by the APPS
processor.

Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/1655004286-11493-5-git-send-email-quic_fenglinw@quicinc.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220930005019.2663064-6-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:33:23 +02:00
Subbaraman Narayanamurthy
b6c1761721 spmi: pmic-arb: do not ack and clear peripheral interrupts in cleanup_irq
Currently, cleanup_irq() is invoked when a peripheral's interrupt
fires and there is no mapping present in the interrupt domain of
spmi interrupt controller.

The cleanup_irq clears the arbiter bit, clears the pmic interrupt
and disables it at the pmic in that order. The last disable in
cleanup_irq races with request_irq() in that it stomps over the
enable issued by request_irq. Fix this by not writing to the pmic
in cleanup_irq. The latched bit will be left set in the pmic,
which will not send us more interrupts even if the enable bit
stays enabled.

When a client wants to request an interrupt, use the activate
callback on the irq_domain to clear latched bit. This ensures
that the latched, if set due to the above changes in cleanup_irq
or when the bootloader leaves it set, gets cleaned up, paving way
for upcoming interrupts to trigger.

With this, there is a possibility of unwanted triggering of
interrupt right after the latched bit is cleared - the interrupt
may be left enabled too. To avoid that, clear the enable first
followed by clearing the latched bit in the activate callback.

Fixes: 6bc546e71e ("spmi: pmic-arb: cleanup unrequested irqs")
Fixes: 02abec3616 ("spmi: pmic-arb: rename pa_xx to pmic_arb_xx and other cleanup")
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[collinsd@codeaurora.org: fix merge conflict]
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/1655004286-11493-4-git-send-email-quic_fenglinw@quicinc.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220930005019.2663064-5-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:33:23 +02:00
Fenglin Wu
abb9088b3a spmi: pmic-arb: handle spurious interrupt
Call handle_bad_irq() when the summary interrupt is fired spuriously.

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/1655004286-11493-3-git-send-email-quic_fenglinw@quicinc.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220930005019.2663064-4-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:33:23 +02:00
Abhijeet Dharmapurikar
33c912d3c5 spmi: pmic-arb: add a print in cleanup_irq
The cleanup_irq() was meant to clear and mask interrupts that were
left enabled in the hardware but there was no interrupt handler
registered for it. Add an error print when it gets invoked.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/1655004286-11493-2-git-send-email-quic_fenglinw@quicinc.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220930005019.2663064-3-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:33:22 +02:00
keliu
9357fc3b3b drivers: spmi: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .

Signed-off-by: keliu <liuke94@huawei.com>
Link: https://lore.kernel.org/r/20220527071338.2359733-1-liuke94@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220930005019.2663064-2-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:33:22 +02:00
Julien Panis
54d0999f96 MAINTAINERS: add TI ECAP driver info
This commit adds driver info for TI ECAP used in capture operating mode.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/20220923142437.271328-5-jpanis@baylibre.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/bb980cb69381c570b72701398991100ac91079ec.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
Julien Panis
4e2f42aa00 counter: ti-ecap-capture: capture driver support for ECAP
ECAP hardware on TI AM62x SoC supports capture feature. It can be used
to timestamp events (falling/rising edges) detected on input signal.

This commit adds capture driver support for ECAP hardware on AM62x SoC.

In the ECAP hardware, capture pin can also be configured to be in
PWM mode. Current implementation only supports capture operating mode.
Hardware also supports timebase sync between multiple instances, but
this driver supports simple independent capture functionality.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/20220923142437.271328-4-jpanis@baylibre.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/25644ce1f2fd15d116977770ede20e024f658513.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
Julien Panis
5a47aed0d6 Documentation: ABI: sysfs-bus-counter: add frequency & num_overflows items
This commit adds frequency and num_overflows items to counter ABI file
(e.g. for TI ECAP hardware used in capture operating mode).

Signed-off-by: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/20220923142437.271328-3-jpanis@baylibre.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/467ae80e97c586c6bc9c453c6156ffcb5d4853d6.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
Julien Panis
b5bee6ced2 dt-bindings: counter: add ti,am62-ecap-capture.yaml
This commit adds a YAML binding for TI ECAP used in capture operating mode.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220923142437.271328-2-jpanis@baylibre.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/33c27451f61b3a01d886da5e6bf6456088956439.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
d2011be1e2 counter: Introduce the COUNTER_COMP_ARRAY component type
The COUNTER_COMP_ARRAY Counter component type is introduced to enable
support for Counter array components. With Counter array components,
exposure for buffers on counter devices can be defined via new Counter
array component macros. This should simplify code for driver authors who
would otherwise need to define individual Counter components for each
array element.

Eight Counter array component macros are introduced::

        DEFINE_COUNTER_ARRAY_U64(_name, _length)
        DEFINE_COUNTER_ARRAY_CAPTURE(_name, _length)
        DEFINE_COUNTER_ARRAY_POLARITY(_name, _enums, _length)
        COUNTER_COMP_DEVICE_ARRAY_U64(_name, _read, _write, _array)
        COUNTER_COMP_COUNT_ARRAY_U64(_name, _read, _write, _array)
        COUNTER_COMP_SIGNAL_ARRAY_U64(_name, _read, _write, _array)
        COUNTER_COMP_ARRAY_CAPTURE(_read, _write, _array)
        COUNTER_COMP_ARRAY_POLARITY(_read, _write, _array)

Eight Counter array callbacks are introduced as well::

        int (*signal_array_u32_read)(struct counter_device *counter,
                                     struct counter_signal *signal,
                                     size_t idx, u32 *val);
        int (*signal_array_u32_write)(struct counter_device *counter,
                                      struct counter_signal *signal,
                                      size_t idx, u32 val);
        int (*device_array_u64_read)(struct counter_device *counter,
                                     size_t idx, u64 *val);
        int (*count_array_u64_read)(struct counter_device *counter,
                                    struct counter_count *count,
                                    size_t idx, u64 *val);
        int (*signal_array_u64_read)(struct counter_device *counter,
                                     struct counter_signal *signal,
                                     size_t idx, u64 *val);
        int (*device_array_u64_write)(struct counter_device *counter,
                                      size_t idx, u64 val);
        int (*count_array_u64_write)(struct counter_device *counter,
                                     struct counter_count *count,
                                     size_t idx, u64 val);
        int (*signal_array_u64_write)(struct counter_device *counter,
                                      struct counter_signal *signal,
                                      size_t idx, u64 val);

Driver authors can handle reads/writes for an array component by
receiving an element index via the `idx` parameter and processing the
respective value via the `val` parameter.

For example, suppose a driver wants to expose a Count's read-only
capture buffer of four elements using a callback
`foobar_capture_read()`::

        DEFINE_COUNTER_ARRAY_CAPTURE(foobar_capture_array, 4);
        COUNTER_COMP_ARRAY_CAPTURE(foobar_capture_read, NULL,
                                   foobar_capture_array)

Respective sysfs attributes for each array element would appear for the
respective Count:

* /sys/bus/counter/devices/counterX/countY/capture0
* /sys/bus/counter/devices/counterX/countY/capture1
* /sys/bus/counter/devices/counterX/countY/capture2
* /sys/bus/counter/devices/counterX/countY/capture3

If a user tries to read _capture2_ for example, `idx` will be `2` when
passed to the `foobar_capture_read()` callback, and thus the driver
knows which array element to handle.

Counter arrays for polarity elements can be defined in a similar
manner as u64 elements::

        const enum counter_signal_polarity foobar_polarity_states[] = {
                COUNTER_SIGNAL_POLARITY_POSITIVE,
                COUNTER_SIGNAL_POLARITY_NEGATIVE,
        };
        DEFINE_COUNTER_ARRAY_POLARITY(foobar_polarity_array,
                                      foobar_polarity_states, 4);
        COUNTER_COMP_ARRAY_POLARITY(foobar_polarity_read,
                                    foobar_polarity_write,
                                    foobar_polarity_array)

Tested-by: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/5310c22520aeae65b1b74952419f49ac4c8e1ec1.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/a51fd608704bdfc5a0efa503fc5481df34241e0a.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
bb4bbbec66 counter: Consolidate Counter extension sysfs attribute creation
Counter extensions are handled for the Device, Counts, and Signals. The
code loops through each Counter extension and creates the expected sysfs
attributes. This patch consolidates that code into functions to reduce
redundancy and make the intention of the code clearer.

Link: https://lore.kernel.org/r/6f2121cf52073028c119dbf981a8b72f3eb625d2.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/0469c3ae3fbccbca908993c78d94f221761a6a3a.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
45d2918520 counter: Introduce the Count capture component
Some devices provide a latch function to save historic Count values.
This patch standardizes exposure of such functionality as Count capture
components. A COUNTER_COMP_CAPTURE macro is provided for driver authors
to define a capture component. A new event COUNTER_EVENT_CAPTURE is
introduced to represent Count value capture events.

Cc: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/c239572ab4208d0d6728136e82a88ad464369a7a.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/3cebaa0b807a225eb277d771504fe6dba7269ffd.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
9830288aea counter: 104-quad-8: Add Signal polarity component
The 104-quad-8 driver provides support for Index signal polarity modes
via the "index_polarity" Signal component. This patch exposes the same
functionality through the more standard "polarity" Signal component.

Link: https://lore.kernel.org/r/01d00c21873159833035cb6775d0d0e8ad55f2ef.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/0bf840beee1665e9f04ea82368ecdde87c791a22.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
650ae67bbf counter: Introduce the Signal polarity component
The Signal polarity component represents the active level of a
respective Signal. There are two possible states: positive (rising edge)
and negative (falling edge); enum counter_signal_polarity represents
these states. A convenience macro COUNTER_COMP_POLARITY() is provided
for driver authors to declare a Signal polarity component.

Cc: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/8f47d6e1db71a11bb1e2666f8e2a6e9d256d4131.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/b6e53438badcb6318997d13dd2fc052f97d808ac.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
7bbf842cdc counter: interrupt-cnt: Implement watch_validate callback
The interrupt-cnt counter driver only pushes one type of event on only
one channel: COUNTER_EVENT_CHANGE_OF_STATE on channel 0. The
interrupt_cnt_watch_validate() watch_valid callback is implemented to
ensure watch configurations are valid for this driver.

Cc: Oleksij Rempel <linux@rempel-privat.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Link: https://lore.kernel.org/r/20220815225058.144203-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/c50b5eede7d3f523de8dc3937dc44680f2773e1d.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
3216e5512a counter: Move symbols into COUNTER namespace
Counter subsystem symbols are only relevant to counter drivers. A
COUNTER namespace is created to control the availability of these
symbols to modules that import this namespace explicitly.

Cc: Patrick Havelange <patrick.havelange@essensium.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Oleksij Rempel <linux@rempel-privat.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Acked-by: David Lechner <david@lechnology.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220815220321.74161-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/8a756df96c24946547a7ece5caa5f654809c5e7f.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:35 +02:00
William Breathitt Gray
55e5832bb1 MAINTAINERS: Update Counter subsystem git tree repo link
The Counter subsystem git tree is now located on the kernel.org git
server.

Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/075c91bb0af32d27a139112701b12b118a50edd6.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:32:34 +02:00
Greg Kroah-Hartman
f5e536af48 FSI changes for v6.1
* Fix a OCC hwmon userspace compatibility regression that was
    introduced in v5.19
 
  * Device tree bindings for the OCC
 
  * A bunch of janitor type fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+nHMAt9PCBDH63wBa3ZZB4FHcJ4FAmM0M4UACgkQa3ZZB4FH
 cJ5kixAAhrKwdGgy/Y0icswgKdixjY7ZkNlVQilKEykMD4KcfarFoRf/6BnyZXMG
 w09nCUjMLmwzYh3ebAEisVv++yNB/FuctCdUjd0UyITqhMkzuVru54ifZuTrcWMw
 8MPRjVZDkbsyDT/gaVRdZgj9FHBybuuQJiGluuw4FgXt78/KBC1dpb/U7zJqsJQt
 eWebyu2giZ/bNm9U4rqZrx0Ld5xOXC/Ry623J3XBbdR9lOgzyAIjbWu6H54sI7eV
 DGsiOLotEPLX4ZZk2VphwaN+WTgV8/ZRfY5VIzH6ZncllJCg8ULCzKLnvF6V3ecr
 j9GLzo9lo0qMcHfN0fiT11jLPWvs6Ji7WjoEc9mGU8NZtVzG+qgJ7z0MQs9IcT1a
 IcrOueCpYfOJjuYey9hWGCIOmm7Fql5f+UPwEkXU6cMFUP0EMtwVp/4ZT51uoZZJ
 JZ4GURMeJnlFLZstCDUhKTg4HiPymzHQPeUjoIsnXAtO4Q45xgaFii2KerIgiTsQ
 5NB2lPqaIbdI2XqoJ/eiTsfEoGppyYKw5bjDcQeICO3nWSNUUjGrdbpvb60XWEBd
 mLDeoTpMBDdDYl6/v1JIvd3jHSsMz2l9X3VshIj6U11TsIsfyvmanY3ac9NljNQF
 Z4W6YHRgGeGM4+jwTsGNXVvel6ZuBO4Y9ld4NOUZWP3x8taYtt0=
 =ZFpc
 -----END PGP SIGNATURE-----

Merge tag 'fsi-for-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi into char-misc-next

Joel writes:
  "FSI changes for v6.1
    * Fix a OCC hwmon userspace compatibility regression that was
      introduced in v5.19
    * Device tree bindings for the OCC
    * A bunch of janitor type fixes"

* tag 'fsi-for-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi:
  fsi: core: Check error number after calling ida_simple_get
  hwmon: (occ) Check for device property for setting OCC active during probe
  fsi: occ: Support probing the hwmon child device from dts node
  dt-bindings: hwmon: Add IBM OCC bindings
  fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe
  fsi: sbefifo: Add detailed debugging information
  fsi: cleanup extern usage in function definition
  fsi: occ: Prevent use after free
  hwmon (occ): Retry for checksum failure
  fsi: occ: Fix checksum failure mode
  fsi: Fix typo in comment
2022-09-30 14:02:47 +02:00
Jiasheng Jiang
35af9fb49b fsi: core: Check error number after calling ida_simple_get
If allocation fails, the ida_simple_get() will return error number.
So master->idx could be error number and be used in dev_set_name().
Therefore, it should be better to check it and return error if fails,
like the ida_simple_get() in __fsi_get_new_minor().

Fixes: 09aecfab93 ("drivers/fsi: Add fsi master definition")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220111073411.614138-1-jiasheng@iscas.ac.cn
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Eddie James
89a286fb15 hwmon: (occ) Check for device property for setting OCC active during probe
A previous commit changed the existing behavior of the driver to skip
attempting to communicate with the OCC during probe. Return to the
previous default behavior of automatically communicating with the OCC
and make it optional with a new device-tree property.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220809200701.218059-4-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Eddie James
0fead4fc92 fsi: occ: Support probing the hwmon child device from dts node
There is now a need for reading devicetree properties in the OCC
hwmon driver, which isn't current supported as the FSI driver just
instantiates a basic platform device. Add support for this use case
by checking for an "occ-hwmon" node and if present, creating an
OF device from it.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220809200701.218059-3-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Eddie James
8d4c99002d dt-bindings: hwmon: Add IBM OCC bindings
These bindings describe the POWER processor On Chip Controller accessed
from a service processor or baseboard management controller (BMC).

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220809200701.218059-2-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Lv Ruyi
182d98e00e fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe
of_parse_phandle returns node pointer with refcount incremented, use
of_node_put() on it when done.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220407085911.2491719-1-lv.ruyi@zte.com.cn
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Joel Stanley
b1534a05e1 fsi: sbefifo: Add detailed debugging information
Provide more output on the timeout status, and make some vdbg calls into
dbg calls so they can be enabled at runtime.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20220415050757.281158-1-joel@jms.id.au
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Tom Rix
362fbc830a fsi: cleanup extern usage in function definition
Smatch reports these issues
fsi-core.c:395:12: warning: function 'fsi_slave_claim_range'
  with external linkage has definition
fsi-core.c:409:13: warning: function 'fsi_slave_release_range'
  with external linkage has definition

The storage-class-specifier extern is not needed in a
definition, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220403140937.3833578-1-trix@redhat.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Eddie James
d3e1e24604 fsi: occ: Prevent use after free
Use get_device and put_device in the open and close functions to
make sure the device doesn't get freed while a file descriptor is
open.
Also, lock around the freeing of the device buffer and check the
buffer before using it in the submit function.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220513194424.53468-1-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Eddie James
dbed963ed6 hwmon (occ): Retry for checksum failure
Due to the OCC communication design with a shared SRAM area,
checkum errors are expected due to corrupted buffer from OCC
communications with other system components. Therefore, retry
the command twice in the event of a checksum failure.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220426154956.27205-3-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-28 21:10:57 +09:30
Eddie James
7326939faa fsi: occ: Fix checksum failure mode
Change the checksum errno to something different than the errno
used for a bad SBE message. In addition, don't set the user's
response length to the data length in this case, since it's not
SBE FFDC.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220426154956.27205-2-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-27 16:57:17 +09:30
Luo Xueqin
f157555ea3 fsi: Fix typo in comment
Spelling mistake in comment.

Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Luo Xueqin <luoxueqin@kylinos.cn>
Link: https://lore.kernel.org/r/20220705152757.27843-1-luoxueqin66@gmail.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-09-27 16:57:17 +09:30
Greg Kroah-Hartman
3aa12610b4 interconnect changes for 6.1
These are the interconnect changes for the 6.1-rc1 merge window, which
 this time are tiny. One is a series to convert the remove() callback of
 platform devices to return void instead of int. The other change is
 enabling modular support for a driver.
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJjMapuAAoJEIDQzArG2BZjERkP/jBLAdgFeiYidCJPrK6FB9WB
 qjbmYJIHrDhQgRThSxLhjAX8me1UXd5VEkjgD26EbNnvNfmt/1Wb2twl7NTEGn+7
 dzqFHCALbmVpJJg2BFg0k+B2stZF0+cPBXsvVzCEbihnVuOfrK9QFu7JwVUaivF5
 wPxYn0vtutqXt2/mjMqGMvjteJPO2D8jV0aSdr1j3mqIZslwqWgr9JMC0IVxGHvW
 ubGV7Ydh64U3PT0eSl0iMCC16HQXihhbU06Lj54QKrOjvVRGQV2kFvPU46TXHskH
 aI0deNrYatnWQo/3sHUt7ihiHadOEDYCXYOT0lq9GYQ2j1EIM9wCL00s/Ljbg1d1
 fBfRtAgtnU/jnsnMlBDbg/PsDSPcNQLE3zKh09Lv4q4rjo69LkKwvraaXEi5j7nc
 +IjpSoppjxd807wxNug/pAXKtVppEsonZhZO+jUnE7hNOAA4wHyr05GKCrCifju8
 7KTKej4dpTeKtIhw4i3/bNj/XzqLlLaOCG7BcEvIQjRW8TUn/BJhDY0PMsdGnXjA
 iE0gx5REJ0TFf+RsccT7ub8K7W03KU8hCREll41/fX06Y6LJbaWMPX874i5P505V
 cTnjISddLgvzlQqD74le9Zel2O+gcaneLiAcXKVPsY8mvRPEJ6S61BvMb2bwT2SB
 jIKhEwCJemNST2e2k4Ej
 =RunL
 -----END PGP SIGNATURE-----

Merge tag 'icc-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Grorgi writes:
  "interconnect changes for 6.1

   These are the interconnect changes for the 6.1-rc1 merge window, which
   this time are tiny. One is a series to convert the remove() callback of
   platform devices to return void instead of int. The other change is
   enabling modular support for a driver."

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: qcom: Kconfig: Make INTERCONNECT_QCOM tristate
  interconnect: imx: Make imx_icc_unregister() return void
  interconnect: Make icc_provider_del() return void
  interconnect: sm8450: Ignore return value of icc_provider_del() in .remove()
  interconnect: osm-l3: Ignore return value of icc_provider_del() in .remove()
  interconnect: msm8974: Ignore return value of icc_provider_del() in .remove()
  interconnect: icc-rpmh: Ignore return value of icc_provider_del() in .remove()
  interconnect: icc-rpm: Ignore return value of icc_provider_del() in .remove()
  interconnect: imx: Ignore return value of icc_provider_del() in .remove()
2022-09-26 19:25:32 +02:00
Greg Kroah-Hartman
0f65caa911 Update extcon next for v6.1
Detailed description for this pull request:
 1. Add USB Type-C support to extcon-tusb320.c
 - Add TYPE-C interface and expose the supported supply current,
 direction and connector polarity via the TYPE-C interface.
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAmMwr6wWHGN3MDAuY2hv
 aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPU5urD/9pPM7tgm4/sgpo5zKALAKFPHtY
 Hf0bNJkMnlqy/3I+aHTZtEwtCQMQ0ICwcyUE8jwmKWPL5mZoinGr8bzcpFYNABCo
 zfJCTpRshMtmQ5aU7FIbVJ9vRt/RmUKKvqC9d/bty+6bd4hAOH9qVMCTajNyg42j
 xB0J0ZjXKbcJuDG+ZoCcRBeP4e4SK9orz9pJgmRHlwcdXH7hGcCHGLfD3e8t9Mbg
 fjdF0cEb8I3rc5rHgaUheRy2lmrhNxRgTk5fNztZfOp9yNDPMx0BDpOr4cMG807C
 nJ8DpJ+dept6zRGf2XXOkU9k5Fczyw43xryYzQYk5tQ6xjNBykbHdXTaiAp4tlCj
 buDcPIzIH0n0nwSA7osDz1xvLXzs3wQFSZCTu/IIjn4TkM/yftDmD8p1Iwci6hsO
 FkDrWEPXM6finotxfESY3p8dJ00PjTHT6B3wxeeeUsifjyJ9KcolkNONX0/t08aA
 mlkM/1dUpYrotBpdBk57OLybTesFjgZDapXSy7uaG3zMIN3Ep8aeBCYUF3/iOZ/w
 TeZIhedzCZekQ1tERZoDbc/bOumiMq1E5VwoiPZXgG/HdAocFCxFy8B0jVxpjpDL
 2iKBAXii+T2QnONOaJQZo31Vx6re2KHnzKllSWZgdmdTOXGbbwGNmNuYkKWShhoT
 /7EZHWuEh4EX0jl/Pw==
 =NX/E
 -----END PGP SIGNATURE-----

Merge tag 'extcon-next-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:
  "Update extcon next for v6.1

   1. Add USB Type-C support to extcon-tusb320.c
    - Add TYPE-C interface and expose the supported supply current,
      direction and connector polarity via the TYPE-C interface."

* tag 'extcon-next-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon:
  extcon: usbc-tusb320: fix kernel-doc warning
  extcon: usbc-tusb320: Add USB TYPE-C support
  extcon: usbc-tusb320: Factor out extcon into dedicated functions
2022-09-26 08:38:19 +02:00
Rong Chen
08099ecd92 extcon: usbc-tusb320: fix kernel-doc warning
Fix the warning:
drivers/extcon/extcon-usbc-tusb320.c:19: warning: expecting prototype
for drivers/extcon/extcon-tusb320.c(). Prototype was for TUSB320_REG8()
instead

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Rong Chen <rong.a.chen@intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2022-09-26 04:40:13 +09:00
Marek Vasut
bf7571c00d extcon: usbc-tusb320: Add USB TYPE-C support
The TI TUSB320 seems like a better fit for USB TYPE-C subsystem,
which can expose details collected by the TUSB320 in a far more
precise way than extcon. Since there are existing users in the
kernel and in DT which depend on the extcon interface, keep it
for now.

Add TYPE-C interface and expose the supported supply current,
direction and connector polarity via the TYPE-C interface.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2022-09-26 04:40:13 +09:00
Marek Vasut
9483811a12 extcon: usbc-tusb320: Factor out extcon into dedicated functions
Move extcon code into separate functions in preparation for addition of
USB TYPE-C support. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2022-09-26 04:40:13 +09:00
Greg Kroah-Hartman
4314a0b79f Second set of IIO new device support, features and cleanup for the 6.1 cycle.
Normal mixed bag of new device support with continuing trend that most new
 devices are supported by extending existing drivers - a positive sign perhaps
 that device manufacturers have somewhat stabilized their interfaces across
 product generations. The BNO055 driver was however a substantial addition
 including several additions to the IIO core.
 
 There are a number of significant patch sets under review, so if the 6.0
 cycle runs long I may send a 3rd pull request.
 
 New device support
 * adi,adxl313
   - Support for the ADXL312 and ADXL314 accelerometers.
 * bosch,bmp280
   - Support for the BMP380 family of pressures sensors.
     Included considerable refactoring and modernization of the bmp280
     driver.
 * bosch,bno055
   - New driver for this i2c/serial attached complex IMU.
 * lltc,ltc2497
   - Support for the LTC2499 16 channel, 24bit ADC.
 * st,pressure
   - Support for the LPS22DF pressure sensor
 * st,lsm6dsx
   - Support for the LSM6DSTX (Mainly adding the ID and WAI)
 
 Features
 * core - to support the bosch,bno055 requirements
   - Support for linear acceleration channel type (effect  of gravity removed)
   - Pitch, yaw and roll modifiers for angle channels.
   - Standard serialnumber attribute documentation.
   - Binary attributes - to allow for calibration save and restore.
 * adi,ad7923
   - Support extended range (wider supported input voltage range).
 * bosch,bmp280
   - Add filter controls for some supported parts.
 * microchip,mcp3911
   - Buffered capture support for this ADC.
   - Data ready interrupt support, including hiz control for line.
   - Oversampling ratio support.
 * st,stm32-adc
   - Support ID registers on parts where they are present, providing
     discoverability of some features.
 
 Fixes - late breaking fixes that I judged could wait for the merge window.
 * adi,ad5593r
   - Add a missing STOP condition between address write and data read.
   - Check for related i2c functionality.
 * adi,ad7923
   - Fix shift reporting for some variants supported by the driver.
 * infinion,dps310
   - Work around a hardware issue where a chip can hang by adding a
     timeout and reset path.
 
 Cleanups
 * Continuing work to switch to new pm macros.
 * MAINTAINERS
   - Drop duplication of wild card covered entry in ADI block and
     add missing entries to cover ltc294x binding files.
 * bosch,bma400
   - Fix trivial smatch warning.
 * bosch,bmp280
   - Fix broken links to datasheets
 * lltc,ltc2497
   - Fix missing entry for ltc2499
 * mexelis,mlx90614
   - Switch to get_avail() callback for _available attributes.
 * microchip,mcp3911
   - Move to devm_ resource management for all elements of probe()
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmMvCnIRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FojJvw//eryvTKL0V0O5Sy0urt1xYV0La/u6z6NB
 ZGIj0yLftIDw2XdU1nJ/uWun6PlqzW9Dbo31jwBrir5vA9m1KWfZ8MXQrYLay1LM
 PLPcIWcfbt7X6inFB6a5Ibe4AiF1XlRp+GmCwm6+IheLj1OphnYsjc74P10Tv40S
 svzqAJ7anZBxym1zIwXOWx8q4xUrzLt/dHsu4z04EbZpdBL8gRjRboKZYJGCHCQJ
 KJtR6zF6ckhTJI6dgFBOAdIeKAeYQMXhIyGbICmZ60vMGxTxXEB8hc2zlCMMBGHj
 ZwrR8wTUU1gPERLAQkSdRHw/3HaxgrAInYfukUZEkJFuxrrVfyNGF901844qBH71
 j6bzbg6pmI/7jijADB6WCAYuSMvpuHei0Ze1ZHG5c+ihHJQFx2vBC3/tVwagT49c
 aGGET0aP4l4D5AzUlLGaDTeS6ySOl+lP8X+jqIWKUiD7ywoKkOvB77BlVilkhpbQ
 IdCt81kxObTSJjDdUounYF0QEnKWxh5DayX72Pj0rBmy4oMEUbQjI6M22guPd00t
 gFb4qD+Sq/3OvNKVBLbP7Qk/92HqZZQZXF85NGRnNW2Xf7ajXnwMCuNlseAGjEtz
 oAryC/LuSvmOMfFQtl842H/9cnlZ13f5GpnukKEFPyxqGvThMd7obUejm7XGDE7P
 /IVEH8eJOjI=
 =q/TD
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-6.1b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

Second set of IIO new device support, features and cleanup for the 6.1 cycle.

Normal mixed bag of new device support with continuing trend that most new
devices are supported by extending existing drivers - a positive sign perhaps
that device manufacturers have somewhat stabilized their interfaces across
product generations. The BNO055 driver was however a substantial addition
including several additions to the IIO core.

There are a number of significant patch sets under review, so if the 6.0
cycle runs long I may send a 3rd pull request.

New device support
* adi,adxl313
  - Support for the ADXL312 and ADXL314 accelerometers.
* bosch,bmp280
  - Support for the BMP380 family of pressures sensors.
    Included considerable refactoring and modernization of the bmp280
    driver.
* bosch,bno055
  - New driver for this i2c/serial attached complex IMU.
* lltc,ltc2497
  - Support for the LTC2499 16 channel, 24bit ADC.
* st,pressure
  - Support for the LPS22DF pressure sensor
* st,lsm6dsx
  - Support for the LSM6DSTX (Mainly adding the ID and WAI)

Features
* core - to support the bosch,bno055 requirements
  - Support for linear acceleration channel type (effect  of gravity removed)
  - Pitch, yaw and roll modifiers for angle channels.
  - Standard serialnumber attribute documentation.
  - Binary attributes - to allow for calibration save and restore.
* adi,ad7923
  - Support extended range (wider supported input voltage range).
* bosch,bmp280
  - Add filter controls for some supported parts.
* microchip,mcp3911
  - Buffered capture support for this ADC.
  - Data ready interrupt support, including hiz control for line.
  - Oversampling ratio support.
* st,stm32-adc
  - Support ID registers on parts where they are present, providing
    discoverability of some features.

Fixes - late breaking fixes that I judged could wait for the merge window.
* adi,ad5593r
  - Add a missing STOP condition between address write and data read.
  - Check for related i2c functionality.
* adi,ad7923
  - Fix shift reporting for some variants supported by the driver.
* infinion,dps310
  - Work around a hardware issue where a chip can hang by adding a
    timeout and reset path.

Cleanups
* Continuing work to switch to new pm macros.
* MAINTAINERS
  - Drop duplication of wild card covered entry in ADI block and
    add missing entries to cover ltc294x binding files.
* bosch,bma400
  - Fix trivial smatch warning.
* bosch,bmp280
  - Fix broken links to datasheets
* lltc,ltc2497
  - Fix missing entry for ltc2499
* mexelis,mlx90614
  - Switch to get_avail() callback for _available attributes.
* microchip,mcp3911
  - Move to devm_ resource management for all elements of probe()

* tag 'iio-for-6.1b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (57 commits)
  iio: adc: mcp3911: add support for oversampling ratio
  dt-bindings: iio: adc: mcp3911: add microchip,data-ready-hiz entry
  iio: adc: mcp3911: add support for interrupts
  iio: adc: mcp3911: add support for buffers
  iio: adc: mcp3911: use resource-managed version of iio_device_register
  iio: accel: bma400: Fix smatch warning based on use of unintialized value.
  iio: light: st_uvis25: Use EXPORT_NS_SIMPLE_DEV_PM_OPS()
  iio: accel: bmi088: Use EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS() and pm_ptr()
  iio: proximity: srf04: Use pm_ptr() to remove unused struct dev_pm_ops
  iio: proximity: sx9360: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  iio: proximity: sx9324: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  iio: proximity: sx9310: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  docs: iio: add documentation for BNO055 driver
  iio: imu: add BNO055 I2C driver
  iio: imu: add BNO055 serdev driver
  dt-bindings: iio/imu: Add Bosch BNO055
  iio: document "serialnumber" sysfs attribute
  iio: document bno055 private sysfs attributes
  iio: imu: add Bosch Sensortec BNO055 core driver
  iio: add support for binary attributes
  ...
2022-09-25 09:09:07 +02:00
Guilherme G. Piccoli
3e081438b8 firmware: google: Test spinlock on panic path to avoid lockups
Currently the gsmi driver registers a panic notifier as well as
reboot and die notifiers. The callbacks registered are called in
atomic and very limited context - for instance, panic disables
preemption and local IRQs, also all secondary CPUs (not executing
the panic path) are shutdown.

With that said, taking a spinlock in this scenario is a dangerous
invitation for lockup scenarios. So, fix that by checking if the
spinlock is free to acquire in the panic notifier callback - if not,
bail-out and avoid a potential hang.

Fixes: 74c5b31c66 ("driver: Google EFI SMI")
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: David Gow <davidgow@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20220909200755.189679-1-gpiccoli@igalia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:59:44 +02:00
Liu Shixin
a5ccec12ac bus: mvebu-mbus: use DEFINE_SHOW_ATTRIBUTE to simplify mvebu_{sdram/devs}_debug
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20220916141244.2174005-1-liushixin2@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:59:26 +02:00
Vishnu Dasa
711898b1d5 MAINTAINERS: Add header files under VMWARE VMCI DRIVER
Add include/linux/vmw_vmci* files under VMWARE VMCI DRIVER.

Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Bryan Tan <bryantan@vmware.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Vishnu Dasa <vdasa@vmware.com>
Link: https://lore.kernel.org/r/20220915031321.1121-1-vdasa@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:58:05 +02:00
Shang XiaoJing
9ea224b119 mei: gsc: Remove redundant dev_err call
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220923100841.17719-1-shangxiaojing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:57:24 +02:00
Jilin Yuan
4b25cf09c6 mei: fix repeated words in comments
Delete the redundant word 'from'.

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
Link: https://lore.kernel.org/r/20220918100431.28381-1-yuanjilin@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:57:21 +02:00
Gaosheng Cui
1b46c82146 drivers/misc/sgi-xp: Remove orphan declarations from drivers/misc/sgi-xp/xp.h
Remove the following orphan declarations from drivers/misc/sgi-xp/xp.h:
1. xp_nofault_PIOR_target
2. xp_error_PIOR
3. xp_nofault_PIOR

They have been removed since commit 9726bfcdb9 ("misc/sgi-xp:
remove SGI SN2 support"), so remove them.

Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://lore.kernel.org/r/20220913110356.764711-1-cuigaosheng1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:57:19 +02:00
Rafał Miłecki
3717ca3e0c nvmem: u-boot-env: fix crc32 casting type
This fixes:
drivers/nvmem/u-boot-env.c:141:17: sparse: sparse: cast to restricted __le32

Fixes: d5542923f2 ("nvmem: add driver handling U-Boot environment variables")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-14-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:56:37 +02:00
Horatiu Vultur
9e8f208ad5 nvmem: lan9662-otp: add support
Add support for OTP controller available on LAN9662. The OTPC controls
the access to a non-volatile memory. The size of the memory is 8KB.
The OTPC can access the memory based on an offset.
Implement both the read and the write functionality.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-13-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00
Horatiu Vultur
d1b274c481 dt-bindings: lan9662-otpc: document Lan9662 OTPC
Document Lan9662 OTP controller.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-12-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00
Rafał Miłecki
d4d432670f nvmem: u-boot-env: find Device Tree nodes for NVMEM cells
DT binding allows specifying NVMEM cells as NVMEM device (provider)
subnodes. Looks for such subnodes when building NVMEM cells.

This allows NVMEM consumers to use U-Boot environment variables.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00
Iskren Chernev
8f6a3a19e9 dt-bindings: nvmem: Add SoC compatible for sm6115
Document SoC compatible for sm6115.

Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00
Rafał Miłecki
a06d9e5a63 nvmem: sort config symbols alphabetically
1. Match what most subsystems do
2. Simplify maintenance a bit
3. Reduce amount of conflicts for new drivers patches

While at it unify indent level in Makefile.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00
Rafał Miłecki
28fc7c986f nvmem: prefix all symbols with NVMEM_
This unifies all NVMEM symbols. They follow one style now.

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00
Krzysztof Kozlowski
105ca4190d dt-bindings: nvmem: qfprom: add IPQ8064 and SDM630 compatibles
Document compatibles for QFPROM used on IPQ8064 and SDM630.  They are
compatible with generic QFPROM fallback.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220916122100.170016-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 14:54:38 +02:00