Skip to content
Snippets Groups Projects
Commit 1dbf1c98 authored by Tobias Kahlki's avatar Tobias Kahlki
Browse files

driver:ucb1400: Determine chip revision during probing

The chip revision is determined from the AC97_RESET register value.
parent 45eb0788
No related branches found
No related tags found
2 merge requests!455CI: Update gitlab-ci,!382driver:ucb1400: Add retry to read routine
...@@ -107,6 +107,11 @@ static int ucb1400_core_probe(struct device *dev) ...@@ -107,6 +107,11 @@ static int ucb1400_core_probe(struct device *dev)
goto err0; goto err0;
} }
ucb_ts.rev = ucb1400_reg_read(ac97, AC97_RESET);
dev_info(dev, "ID: 0x%x Rev.: 0x%x",
ucb_ts.id, ucb_ts.rev);
/* GPIO */ /* GPIO */
ucb_gpio.ac97 = ac97; ucb_gpio.ac97 = ac97;
if (pdata) { if (pdata) {
......
...@@ -79,7 +79,10 @@ ...@@ -79,7 +79,10 @@
#define UCB_ADC_DAT_MASK 0x3ff #define UCB_ADC_DAT_MASK 0x3ff
#define UCB_ID 0x7e #define UCB_ID 0x7e
#define UCB_ID_1400 0x4304 #define UCB_ID_1400 0x4304
#define UCB_REV_1B 0x2a
#define UCB_REV_2A 0x2a0
// One AC97 frame takes 21us // One AC97 frame takes 21us
#define AC97_LINK_FRAME 21 #define AC97_LINK_FRAME 21
...@@ -100,6 +103,7 @@ struct ucb1400_gpio { ...@@ -100,6 +103,7 @@ struct ucb1400_gpio {
struct ucb1400_ts { struct ucb1400_ts {
struct input_dev *ts_idev; struct input_dev *ts_idev;
int id; int id;
int rev;
int irq; int irq;
struct snd_ac97 *ac97; struct snd_ac97 *ac97;
wait_queue_head_t ts_wait; wait_queue_head_t ts_wait;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment