Commit graph

361 commits

Author SHA1 Message Date
Gerard Marull-Paretas ae91933c4a drivers: pwm: always use nanoseconds for set
In order to be consistent with what is possible in Devicetree, always
take a period in nanoseconds. Other scales or units may be specified by
using, e.g., the PWM_MSEC() macros (all of them converting down to
nanoseconds). This change then deletes the "_nsec" and "_usec" versions
of the pwm_set call.

Note that this change limits the period to UINT32_MAX nanoseconds,
~4.3s. PWM is, in generali, used with periods below the second so it
should not be a problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Gerard Marull-Paretas 95b56cdffd drivers: pwm: remove _pin from API calls
In a first place, the PWM API operates on "channels", not "pins". While
the API calls could have been changed by _channel, this patch takes the
approach of just dropping _pin. The main reason is that all API calls
operate by definition on a channel basis, so it is a bit redundant to
make this part of the name. Because the `_dt` variants of the calls are
going to be introduced soon, the change to `_channels` + `_dt` would
make API function names quite long.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Fabio Baltieri 82634eda93 dt: pwm: add support for specifying frequency in Hz and kHz
Add a pair of dt macros for specifying the pwm frequency in hertz or
kilohertz: PWM_HZ and PWM_KHZ. This is then converted in period
nanoseconds so it works as expected with the other definitions.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-04-27 09:31:19 -05:00
Erwan Gouriou dda9170ba3 include/zephyr/dt-bindings/clock: stm32g0: Fix APB bus address mix up
APB1 and APB2 bus addresses were mixed up.
Fix this

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-26 13:40:34 -05:00
Erwan Gouriou d67b341282 include: Move stm32 clock dt-bindings to include/zephyr/dt-bindings/clock
Fix STM32 clock dt-bindings location as they were added during
the shift of bt-bindings location from include to include/zephyr.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-24 19:47:54 +02:00
Yuval Peress 72f81021b2 include: move include files to correct location
Files should not be in the root include/ directory but instead under
the zephyr/ prefix path.

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-20 15:27:09 -04:00
Maxim Kolchurin 329cff8ab4 stm32: dt-bindings: fix AFIO_MAPR SPI3_REMAP0/1 bit pos
set SPI3_REMAP0/1 bit of AFIO_MAPR register to right position

Signed-off-by: Maxim Kolchurin <maxim.kolchurin@gmail.com>
2022-04-20 09:04:31 -05:00
Georgij Cernysiov 951654cf18 include: dt-bindings: timer: stm32: move to correct dir
Moves dt-bindings constants file to correct location.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-19 11:49:42 +02:00
Georgij Cernysiov 7ce7f75ae9 include: dt-bindings: add stm32 fmc nor psram defines
Add defines to configure STM32
FMC NOR/PSRAM controller.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-19 11:47:06 +02:00
Vaishnav Achath e2ed8cf130 drivers: pinctrl: add CC13XX/CC26XX pinctrl driver
Add pinctrl driver for CC13XX/CC26XX family of SoCs
to facilitate transition from pinmux to pinctrl.

`IOCPortConfigureSet()` from TI hal driverlib used to
implement the generic pinctrl driver.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00