led: pca9633: Remove dts_fixup.h
Since the pca9633 led driver still supports both DTS and non-DTS configuration, we update the code to use DT_<COMPAT>_<INSTANCE> defines for the CONFIG_HAS_DTS_I2C case. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
be0d753721
commit
489cecd505
3 changed files with 7 additions and 10 deletions
|
@ -18,6 +18,12 @@
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(pca9633);
|
LOG_MODULE_REGISTER(pca9633);
|
||||||
|
|
||||||
|
#ifdef CONFIG_HAS_DTS_I2C
|
||||||
|
#define CONFIG_PCA9633_DEV_NAME DT_NXP_PCA9633_0_LABEL
|
||||||
|
#define CONFIG_PCA9633_I2C_ADDRESS DT_NXP_PCA9633_0_BASE_ADDRESS
|
||||||
|
#define CONFIG_PCA9633_I2C_MASTER_DEV_NAME DT_NXP_PCA9633_0_BUS_NAME
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "led_context.h"
|
#include "led_context.h"
|
||||||
|
|
||||||
/* PCA9633 select registers determine the source that drives LED outputs */
|
/* PCA9633 select registers determine the source that drives LED outputs */
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#if defined(CONFIG_HAS_DTS_I2C)
|
|
||||||
|
|
||||||
#ifndef CONFIG_PCA9633_DEV_NAME
|
|
||||||
#define CONFIG_PCA9633_DEV_NAME DT_ST_STM32_I2C_V2_40005400_NXP_PCA9633_62_LABEL
|
|
||||||
#define CONFIG_PCA9633_I2C_ADDRESS DT_ST_STM32_I2C_V2_40005400_NXP_PCA9633_62_BASE_ADDRESS
|
|
||||||
#define CONFIG_PCA9633_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V2_40005400_NXP_PCA9633_62_BUS_NAME
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(main);
|
LOG_MODULE_REGISTER(main);
|
||||||
|
|
||||||
#define LED_DEV_NAME CONFIG_PCA9633_DEV_NAME
|
#define LED_DEV_NAME DT_NXP_PCA9633_0_LABEL
|
||||||
#define NUM_LEDS 4
|
#define NUM_LEDS 4
|
||||||
#define MAX_BRIGHTNESS 100
|
#define MAX_BRIGHTNESS 100
|
||||||
#define HALF_BRIGHTNESS (MAX_BRIGHTNESS / 2)
|
#define HALF_BRIGHTNESS (MAX_BRIGHTNESS / 2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue