NFC: pn544: Refactor hw_config values
authorArman Uguray <armansito@chromium.org>
Fri, 15 Nov 2013 01:07:32 +0000 (17:07 -0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Sat, 4 Jan 2014 02:32:27 +0000 (03:32 +0100)
Some of the EEPROM configurations that are assigned by the PN544 driver
are set by the firmware and should not be modified by the driver. Others
are certain user mode configurations that are currently getting set to values
that shouldn't necessarily be dictated by the driver. This patch changes
most user and system mode configurations to the firmware defaults.

Signed-off-by: Arman Uguray <armansito@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/pn544/pn544.c

index 51e21a87cd847896754fece3b17f02293b8de86c..3df4a109cfadfb36a5ccd08e788feef43da0048e 100644 (file)
@@ -195,42 +195,42 @@ static int pn544_hci_ready(struct nfc_hci_dev *hdev)
 
                {{0x9e, 0xaa}, 0x01},
 
-               {{0x9b, 0xd1}, 0x0d},
-               {{0x9b, 0xd2}, 0x24},
-               {{0x9b, 0xd3}, 0x0a},
-               {{0x9b, 0xd4}, 0x22},
-               {{0x9b, 0xd5}, 0x08},
-               {{0x9b, 0xd6}, 0x1e},
-               {{0x9b, 0xdd}, 0x1c},
-
-               {{0x9b, 0x84}, 0x13},
-               {{0x99, 0x81}, 0x7f},
-               {{0x99, 0x31}, 0x70},
+               {{0x9b, 0xd1}, 0x17},
+               {{0x9b, 0xd2}, 0x58},
+               {{0x9b, 0xd3}, 0x10},
+               {{0x9b, 0xd4}, 0x47},
+               {{0x9b, 0xd5}, 0x0c},
+               {{0x9b, 0xd6}, 0x37},
+               {{0x9b, 0xdd}, 0x33},
+
+               {{0x9b, 0x84}, 0x00},
+               {{0x99, 0x81}, 0x79},
+               {{0x99, 0x31}, 0x79},
 
                {{0x98, 0x00}, 0x3f},
 
-               {{0x9f, 0x09}, 0x00},
+               {{0x9f, 0x09}, 0x02},
 
                {{0x9f, 0x0a}, 0x05},
 
                {{0x9e, 0xd1}, 0xa1},
-               {{0x99, 0x23}, 0x00},
-
-               {{0x9e, 0x74}, 0x80},
+               {{0x99, 0x23}, 0x01},
 
+               {{0x9e, 0x74}, 0x00},
+               {{0x9e, 0x90}, 0x00},
                {{0x9f, 0x28}, 0x10},
 
-               {{0x9f, 0x35}, 0x14},
+               {{0x9f, 0x35}, 0x04},
 
-               {{0x9f, 0x36}, 0x60},
+               {{0x9f, 0x36}, 0x11},
 
                {{0x9c, 0x31}, 0x00},
 
-               {{0x9c, 0x32}, 0xc8},
+               {{0x9c, 0x32}, 0x00},
 
-               {{0x9c, 0x19}, 0x40},
+               {{0x9c, 0x19}, 0x0a},
 
-               {{0x9c, 0x1a}, 0x40},
+               {{0x9c, 0x1a}, 0x0a},
 
                {{0x9c, 0x0c}, 0x00},
 
@@ -240,13 +240,13 @@ static int pn544_hci_ready(struct nfc_hci_dev *hdev)
 
                {{0x9c, 0x13}, 0x00},
 
-               {{0x98, 0xa2}, 0x0e},
+               {{0x98, 0xa2}, 0x09},
 
-               {{0x98, 0x93}, 0x40},
+               {{0x98, 0x93}, 0x00},
 
-               {{0x98, 0x7d}, 0x02},
+               {{0x98, 0x7d}, 0x08},
                {{0x98, 0x7e}, 0x00},
-               {{0x9f, 0xc8}, 0x01},
+               {{0x9f, 0xc8}, 0x00},
        };
        struct hw_config *p = hw_config;
        int count = ARRAY_SIZE(hw_config);