History

Merge tag 'hsi-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI updates from Sebastian Reichel: "Misc fixes" * tag 'hsi-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: nokia-modem: use flags argument of devm_gpiod_get to set direction HSI: nokia-modem: Reduce missing driver message to debug level HSI: cmt_speech: fix timestamp interface

Linus Torvalds committed 11 years ago

Commit 5262f252 parents acd5312 f451e763 files · +22 −14Browse files

Unified · Split

3 files
  1. drivers/hsi/clients/cmt_speech.c +7 −2
  2. drivers/hsi/clients/nokia-modem.c +4 −7
  3. include/uapi/linux/hsi/cs-protocol.h +11 −5
drivers/hsi/clients/cmt_speech.c+7−2
@@ -451,9 +451,14 @@ static void cs_hsi_read_on_control_complete(struct hsi_msg *msg) · 450 unmodified lines
451451 dev_dbg(&hi->cl->device, "Read on control: %08X\n", cmd);
452452 cs_release_cmd(msg);
453453 if (hi->flags & CS_FEAT_TSTAMP_RX_CTRL) {
454− struct timespec *tstamp =
454+ struct timespec tspec;
455+ struct cs_timestamp *tstamp =
455456 &hi->mmap_cfg->tstamp_rx_ctrl;
456− do_posix_clock_monotonic_gettime(tstamp);
457+
458+ ktime_get_ts(&tspec);
459+
460+ tstamp->tv_sec = (__u32) tspec.tv_sec;
461+ tstamp->tv_nsec = (__u32) tspec.tv_nsec;
457462 }
458463 spin_unlock(&hi->lock);
459464
drivers/hsi/clients/nokia-modem.c+4−7
@@ -112,7 +112,8 @@ static int nokia_modem_gpio_probe(struct device *dev) · 111 unmodified lines
112112 modem->gpio_amount = gpio_count;
113113
114114 for (i = 0; i < gpio_count; i++) {
115− modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i);
115+ modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i,
116+ GPIOD_OUT_LOW);
116117 if (IS_ERR(modem->gpios[i].gpio)) {
117118 dev_err(dev, "Could not get gpio %d\n", i);
118119 return PTR_ERR(modem->gpios[i].gpio);
@@ -125,10 +126,6 @@ static int nokia_modem_gpio_probe(struct device *dev) · 6 unmodified lines
125126 return err;
126127 }
127128
128− err = gpiod_direction_output(modem->gpios[i].gpio, 0);
129− if (err)
130− return err;
131−
132129 err = gpiod_export(modem->gpios[i].gpio, 0);
133130 if (err)
134131 return err;
@@ -208,7 +205,7 @@ static int nokia_modem_probe(struct device *dev) · 73 unmodified lines
208205
209206 err = device_attach(&modem->ssi_protocol->device);
210207 if (err == 0) {
211− dev_err(dev, "Missing ssi-protocol driver\n");
208+ dev_dbg(dev, "Missing ssi-protocol driver\n");
212209 err = -EPROBE_DEFER;
213210 goto error3;
214211 } else if (err < 0) {
@@ -231,7 +228,7 @@ static int nokia_modem_probe(struct device *dev) · 16 unmodified lines
231228
232229 err = device_attach(&modem->cmt_speech->device);
233230 if (err == 0) {
234− dev_err(dev, "Missing cmt-speech driver\n");
231+ dev_dbg(dev, "Missing cmt-speech driver\n");
235232 err = -EPROBE_DEFER;
236233 goto error4;
237234 } else if (err < 0) {
include/uapi/linux/hsi/cs-protocol.h+11−5
@@ -75,6 +75,15 @@ struct cs_buffer_config { · 74 unmodified lines
7575 __u32 reserved[4];
7676 };
7777
78+/*
79+ * struct for monotonic timestamp taken when the
80+ * last control command was received
81+ */
82+struct cs_timestamp {
83+ __u32 tv_sec; /* seconds */
84+ __u32 tv_nsec; /* nanoseconds */
85+};
86+
7887 /*
7988 * Struct describing the layout and contents of the driver mmap area.
8089 * This information is meant as read-only information for the application.
@@ -91,11 +100,8 @@ struct cs_mmap_config_block { · 10 unmodified lines
91100 __u32 rx_ptr;
92101 __u32 rx_ptr_boundary;
93102 __u32 reserved3[2];
94− /*
95− * if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic
96− * timestamp taken when the last control command was received
97− */
98− struct timespec tstamp_rx_ctrl;
103+ /* enabled with CS_FEAT_TSTAMP_RX_CTRL */
104+ struct cs_timestamp tstamp_rx_ctrl;
99105 };
100106
101107 #define CS_IO_MAGIC 'C'

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t