changeset 3976:106f55578f7b

driver/si446x: do not match chip part number on init
author Alexandre Becoulet <alexandre.becoulet@free.fr>
date Mon, 09 Jul 2018 18:13:50 +0200
parents 9940bed2b33e
children 841bf310b65f
files arch/efm32/efm32_stk.build drivers/rfpacket/si446x/si446x.config drivers/rfpacket/si446x/si446x.h drivers/rfpacket/si446x/si446x_spi.bc
diffstat 4 files changed, 2 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/arch/efm32/efm32_stk.build	Fri Jul 06 14:53:36 2018 +0200
+++ b/arch/efm32/efm32_stk.build	Mon Jul 09 18:13:50 2018 +0200
@@ -89,11 +89,9 @@
 
 %section ezr32-stk6200a
   %inherit ezr32-stk620xa
-  CONFIG_DRIVER_RFPACKET_SI446X_CHIPPART 0x604400 
 
 %section ezr32-stk6202a
   %inherit ezr32-stk620xa
-  CONFIG_DRIVER_RFPACKET_SI446X_CHIPPART 0x614400
 
 %section ezr32-stk620xa
   %inherit efm32-lg330-f256-bga
--- a/drivers/rfpacket/si446x/si446x.config	Fri Jul 06 14:53:36 2018 +0200
+++ b/drivers/rfpacket/si446x/si446x.config	Mon Jul 09 18:13:50 2018 +0200
@@ -40,13 +40,6 @@
   flags value
 %config end
 
-%config CONFIG_DRIVER_RFPACKET_SI446X_CHIPPART
-  desc SI446X chip part (si4460: 0x604400, si4461: 0x614400, si4463: 0x634400)
-  parent CONFIG_DRIVER_RFPACKET_SI446X
-  default 0x614400
-  flags value
-%config end
-
 %config CONFIG_DRIVER_RFPACKET_SI446X_FREQ_XO
   desc SI446X XO frequency
   parent CONFIG_DRIVER_RFPACKET_SI446X
--- a/drivers/rfpacket/si446x/si446x.h	Fri Jul 06 14:53:36 2018 +0200
+++ b/drivers/rfpacket/si446x/si446x.h	Mon Jul 09 18:13:50 2018 +0200
@@ -258,8 +258,6 @@
                    \--------------- JAMMING       (16)
 */
 
-#define SI446X_CHIP_INFO        (CONFIG_DRIVER_RFPACKET_SI446X_CHIPPART | CONFIG_DRIVER_RFPACKET_SI446X_CHIPREV)
-
 #define STATUS_RX_ALMOST_FULL   8
 #define STATUS_TX_ALMOST_EMPTY  9
 #define STATUS_OTHER_ERR        10
--- a/drivers/rfpacket/si446x/si446x_spi.bc	Fri Jul 06 14:53:36 2018 +0200
+++ b/drivers/rfpacket/si446x/si446x_spi.bc	Mon Jul 09 18:13:50 2018 +0200
@@ -53,8 +53,8 @@
         call16                  %poll_cts_rsp:link,     poll_cts_rsp
         spi_rd                  %tmp,                   3,      CS_END
         unpack32le              %tmp,                   1,      3
-        extz                    %tmp,                   23
-        cst32                   %id,                    SI446X_CHIP_INFO,       0
+        extz                    %tmp,                   15
+        cst32                   %id,                    0x4400 | CONFIG_DRIVER_RFPACKET_SI446X_CHIPREV,       0
         neq                     %tmp,                   %id
           abort
   patch_loop: