Convert older DT_INST_ macro use in microchip drivers to the new
include/devicetree.h DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add support for requesting an inverted PWM pulse (active-low) when
setting up the period and pulse width of a PWM pin. This is useful
when driving external, active-low circuitry (e.g. an LED) with a PWM
signal.
All in-tree PWM drivers is updated to match the new API signature, but
no driver support for inverted PWM signals is added yet.
All in-tree PWM consumers are updated to pass a flags value of 0
(0 meaning default, which is normal PWM polarity).
Fixes#21384.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Seems to be fine to temporarly cast to int there as frequencies are in
Mhz and not Ghz.
Fixes#20497
Coverity CID: 205638
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fix an issue discovered by Coverity where there is a potential
out of bound access on the divisor arrays.
Fixes#20495Fixes#20496
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fixes u32_t overflow during intermediary calculations using u64_t for
it. on_off is temporary value used for calculating on and off and it
got overflowed with simple test in tests/drivers/pwm/pwm_api
([period]: 2000, [pulse]: 2000)
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Values used in tests/drivers/pwm/pwm_api overflows calculation inside
xec_compute_dc(). Make calculation to be done in u64_t and then
convert to int.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
A 16bits on/off based PWM, found on MEC1501.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>