dts: Make instance defines consistent

We generated a define for each instance to convey its existance of the
form:
	#define DT_<COMPAT>_<INSTANCE> 1

However we renamed all other instance defines to be of the form
DT_INST_<INSTANCE>_<FOO>.  To make things consistent we now generate a
define of the form:

	#define DT_INST_<INSTANCE>_<COMPAT> 1

We also now deprecate the DT_<COMPAT>_<INSTANCE> form and fixup all uses
to use the new form.

Fixes: #17650

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-07-30 13:43:01 -05:00 committed by Maureen Helm
commit 4e7863dc41
18 changed files with 108 additions and 107 deletions

View file

@ -502,7 +502,7 @@ DEVICE_AND_API_INIT(ht16k33_##id, DT_INST_##id##_HOLTEK_HT16K33_LABEL, \
/* Support up to eight HT16K33 devices */
#ifdef DT_HOLTEK_HT16K33_0
#ifdef DT_INST_0_HOLTEK_HT16K33
#ifdef DT_INST_0_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(0);
#else
@ -510,7 +510,7 @@ HT16K33_DEVICE(0);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_1
#ifdef DT_INST_1_HOLTEK_HT16K33
#ifdef DT_INST_1_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(1);
#else
@ -518,7 +518,7 @@ HT16K33_DEVICE(1);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_2
#ifdef DT_INST_2_HOLTEK_HT16K33
#ifdef DT_INST_2_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(2);
#else
@ -526,7 +526,7 @@ HT16K33_DEVICE(2);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_3
#ifdef DT_INST_3_HOLTEK_HT16K33
#ifdef DT_INST_3_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(3);
#else
@ -534,7 +534,7 @@ HT16K33_DEVICE(3);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_4
#ifdef DT_INST_4_HOLTEK_HT16K33
#ifdef DT_INST_4_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(4);
#else
@ -542,7 +542,7 @@ HT16K33_DEVICE(4);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_5
#ifdef DT_INST_5_HOLTEK_HT16K33
#ifdef DT_INST_5_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(5);
#else
@ -550,7 +550,7 @@ HT16K33_DEVICE(5);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_6
#ifdef DT_INST_6_HOLTEK_HT16K33
#ifdef DT_INST_6_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(6);
#else
@ -558,7 +558,7 @@ HT16K33_DEVICE(6);
#endif
#endif
#ifdef DT_HOLTEK_HT16K33_7
#ifdef DT_INST_7_HOLTEK_HT16K33
#ifdef DT_INST_7_HOLTEK_HT16K33_IRQ_GPIOS_CONTROLLER
HT16K33_DEVICE_WITH_IRQ(7);
#else