summaryrefslogtreecommitdiff
path: root/drivers/sensors/pmw33xx_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sensors/pmw33xx_common.h')
-rw-r--r--drivers/sensors/pmw33xx_common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h
index 87e8b34d5c..c725e80f24 100644
--- a/drivers/sensors/pmw33xx_common.h
+++ b/drivers/sensors/pmw33xx_common.h
@@ -66,7 +66,13 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti
// Support single and plural spellings
#ifndef PMW33XX_CS_PINS
# ifndef PMW33XX_CS_PIN
-# error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS"
+# ifdef POINTING_DEVICE_CS_PIN
+# define PMW33XX_CS_PIN POINTING_DEVICE_CS_PIN
+# define PMW33XX_CS_PINS \
+ { PMW33XX_CS_PIN }
+# else
+# error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS"
+# endif
# else
# define PMW33XX_CS_PINS \
{ PMW33XX_CS_PIN }