Some GPIO providers set names for GPIO lines that match the names of
the pins on the SoC, or variations on that theme. These names are
generic more often that not, such as pioC12 in the at91 case. These
generic names block the possibility to set more useful GPIO line
names with device properties (i.e. gpio-line-names).
Allow overriding a generic name given by the GPIO driver if there is
a name given to the GPIO line using device properties, but leave the
generic name alone if no better name is available.
However, there is a risk. If user space is depending on the above
mentioned fixed GPIO names, AND there are device properties that
previously did not reach the surface, the name change might cause
regressions. But hopefully this stays below the radar...
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Change-Id: I26f7f2e1dcc49a7496da0d36ee526a4594189890
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/271951
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-by: Antonio Maria BORNEO <antonio.borneo@st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
The oversampling ratio is shared by all channels, no matter the type
(e.g. single ended or differential). Currently two attributes are
declared for each type:
- in_voltage-voltage_oversampling_ratio
in_voltage-voltage_oversampling_ratio_available
- in_voltage_oversampling_ratio
in_voltage_oversampling_ratio_available
Use the "info_mask_shared_by_all" instead of "info_mask_shared_by_type".
Initial value reported after probe is '0' which isn't a valid ratio.
(it should be at least 1 by default, e.g. no oversampling). Fix it by
storing the oversampling index in the array, instead of its value in
adc struct. This fixes the initial condition.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Ibb015e32522be01b94d05fd01896ad77fbc31540
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/269087
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Olivier MOYSAN <olivier.moysan@foss.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Add passive cooling to the CPU of stm32mp13.
Limit the CPU frequency to step 1 in case of temperatur over 95 degrees.
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266081
Change-Id: Ia0c3a93199255e83da8eaa193a0fbd01983ddd98
The irq handling is currently split between the irq handler
and the threaded irq handler. Some of the handling (such as
dma related stuffs) done within the irq handler might sleep or
take some time leading to issues if the kernel is built with
realtime constraints. In order to fix that, perform an overall
rework to perform most of the job within the threaded handler
and only keep fifo access in the non threaded handler.
Change-Id: I24740c22cacdd143b7036689de1f18353bfa9edb
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265551
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
The "Get Current Connector Alternate Mode" command is optional. The PPM
will set the "Not Supported Indicator" flag in the command status, if it
isn't supported (-EOPNOTSUPP error is reported by ucsi_exec_command()).
As this command is optional, this case shouldn't be treated as an error:
- Improve the error message to display the error code.
- Turn the not supported case into a dev_dbg instead of a dev_err.
Note: This error message is no longer seen upstream, after:
commit b9aa02ca39 ("usb: typec: ucsi: Add polling mechanism for partner
tasks like alt mode checking")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Id7fcb5477775b90508790064d0572d310e5db5e8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265182
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
When the "wakeup-source" flag is found, I2C core marks the device as
wakeup capable and enables the wakeup by default.
Up to now, choice was being made to disable the wakeup by default. Goal was
to simplify the user application, to be able to reach lowest possible
power state by default (standby) on stm32mp135f-dk board.
User had to specifically re-enable the type-c wakeup if needed.
Since the PWR IRQ and wakeup capability is now implemented by the secure
and non-secure side, the standby mode can be reached by default.
So, remove earlier limitation, which was hacky behing "ucsi" and "psy"
frameworks.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: If2593b0d440c97d1e0cbe9da435f17b6e63da547
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265107
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
OPTEE asynchronous notifications doesn't support the set_wake option
currently.
In case a device is using the optee irq and is marked as wakeup source,
this result in "Unbalanced IRQ xx wake disable" backtrace, since:
- in irq_set_irq_wake(ON), wake_depth gets incremented, then reset due to
set_irq_wake_real() returns an error (irq_set_wake() isn't unimplemented)
- in irq_set_irq_wake(OFF), wake_depth is always 0, hence the warning
So flag the OPTEE irq_chip to skip set_wake.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Ieea3acbd2aed15bcdc66fb21e8e71ef5f9b24aa3
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265106
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Pascal PAILLET <p.paillet@st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Reviewed-by: Gatien CHEVALLIER <gatien.chevallier@st.com>
Reviewed-by: Etienne CARRIERE <etienne.carriere@foss.st.com>
USB Type-c controller (stm32g0) has an interrupt pin wired to a
STM32MP13 PWR wakeup pin on DK board. It can be used as a wakeup source,
to wakeup the system from standby mode, when changes are identified on the
Type-c connector.
All is configured in OPTEE, adopt it.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: I23380dccb337665e06edc1c8d14caf58549efbc9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/260811
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Commit 61367d0b8f ("spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4")
allowed to properly communicate with the st-gyro-spi even when
there is no tx_buf provided by setting the flag SPI_MASTER_MUST_TX and
thus forcing a dummy TX buffer to work in Full Duplex.
This behavior should kept only for the STM32F4 and not for other
compatible since the STM32H7 do support SIMPLEX_RX and SIMPLEX_TX.
Add the flags variable within the struct stm32_spi_cfg so that flags
used at master registration time are compatible specific.
Fixes: 61367d0b8f ("spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Change-Id: I5620ad12edf608bb761c5cabd4848ff56edbcbe8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/235712
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/260233
Tested-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
This change introduces a change in the application of the
configuration for the RNG at cold boot and during low-power
sequences.
Configuration should be applicable when the conditioning soft
reset is supported. Remove the dependency to the clock error
detection for this part as there is no link between the two.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Change-Id: Ib12b5a29eebd6dee656bb980af8de21cd4e96e06
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/261072
Tested-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>