#define NEWTON_GPIO_B RK29_PIN4_PB2\r
#define NEWTON_GPIO_AC_DETEC RK29_PIN4_PA1\r
#define NEWTON_GPIO_GPS_PWR RK29_PIN6_PB2\r
+#define NEWTON_IDBDATA_SIZE 512\r
+#define NEWTON_GET_IDBDATA 0x600F\r
#define NEWTON_GET_UID 0x6001\r
#define NEWTON_AC_DETEC 0x6002\r
#define NEWTON_GPS_CTRL 0x6003\r
\r
switch(cmd)\r
{\r
- case NEWTON_GET_UID:\r
- {\r
- IdbSector3 sn;\r
- DBG("%s:NEWTON_GET_UID\n",__FUNCTION__);\r
- memset(&sn,0,sizeof(IdbSector3));\r
- GetSNSectorInfo((char*)&sn);\r
- //newton_print_buf(&sn.UID_Data, sizeof(sn.UID_Data));\r
+ case NEWTON_GET_UID:\r
+ {\r
+ IdbSector3 sn;\r
+\r
+ DBG("%s:NEWTON_GET_UID\n",__FUNCTION__);\r
+ memset(&sn,0,sizeof(IdbSector3));\r
+ GetSNSectorInfo((char*)&sn);\r
+ //newton_print_buf(&sn.UID_Data, sizeof(sn.UID_Data));\r
if(copy_to_user(argp, &sn.UID_Data, sizeof(sn.UID_Data))) return -EFAULT;\r
- }\r
- break;\r
+ }\r
+ break;\r
+\r
+ case NEWTON_GET_IDBDATA:\r
+ {\r
+ char data[NEWTON_IDBDATA_SIZE];\r
+\r
+ memset(data, 0, NEWTON_IDBDATA_SIZE);\r
+ GetSNSectorInfo(data);\r
+ if(copy_to_user(argp, data, NEWTON_IDBDATA_SIZE))\r
+ return -EFAULT;\r
+ }\r
+ break;\r
+\r
/* \r
case NEWTON_AC_DETEC:\r
{\r