summaryrefslogtreecommitdiff
path: root/drivers/led/issi/is31fl3736.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/issi/is31fl3736.c')
-rw-r--r--drivers/led/issi/is31fl3736.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c
index a070836b38..c8c035854f 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -48,7 +48,7 @@
#define IS31FL3736_REG_SWPULLUP 0x0F // PG3
#define IS31FL3736_REG_CSPULLUP 0x10 // PG3
-#ifndef IS31FL3736_TIMEOUT
+#ifndef IS31FL3736_I2C_TIMEOUT
# define IS31FL3736_I2C_TIMEOUT 100
#endif
@@ -56,6 +56,10 @@
# define IS31FL3736_I2C_PERSISTENCE 0
#endif
+#ifndef IS31FL3736_PWM_FREQUENCY
+# define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3736B only
+#endif
+
#ifndef IS31FL3736_SWPULLUP
# define IS31FL3736_SWPULLUP IS31FL3736_PUR_0R
#endif
@@ -159,7 +163,7 @@ void is31fl3736_init(uint8_t addr) {
// Set global current to maximum.
is31fl3736_write_register(addr, IS31FL3736_REG_GLOBALCURRENT, IS31FL3736_GLOBALCURRENT);
// Disable software shutdown.
- is31fl3736_write_register(addr, IS31FL3736_REG_CONFIGURATION, 0x01);
+ is31fl3736_write_register(addr, IS31FL3736_REG_CONFIGURATION, ((IS31FL3736_PWM_FREQUENCY & 0b111) << 3) | 0x01);
// Wait 10ms to ensure the device has woken up.
wait_ms(10);