Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+22 -14
+7 -2
drivers/hsi/clients/cmt_speech.c
··· 451 451 dev_dbg(&hi->cl->device, "Read on control: %08X\n", cmd); 452 452 cs_release_cmd(msg); 453 453 if (hi->flags & CS_FEAT_TSTAMP_RX_CTRL) { 454 - struct timespec *tstamp = 454 + struct timespec tspec; 455 + struct cs_timestamp *tstamp = 455 456 &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; 457 462 } 458 463 spin_unlock(&hi->lock); 459 464
+4 -7
drivers/hsi/clients/nokia-modem.c
··· 112 112 modem->gpio_amount = gpio_count; 113 113 114 114 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); 116 117 if (IS_ERR(modem->gpios[i].gpio)) { 117 118 dev_err(dev, "Could not get gpio %d\n", i); 118 119 return PTR_ERR(modem->gpios[i].gpio); ··· 125 124 dev_err(dev, "Could not get gpio name %d\n", i); 126 125 return err; 127 126 } 128 - 129 - err = gpiod_direction_output(modem->gpios[i].gpio, 0); 130 - if (err) 131 - return err; 132 127 133 128 err = gpiod_export(modem->gpios[i].gpio, 0); 134 129 if (err) ··· 205 208 206 209 err = device_attach(&modem->ssi_protocol->device); 207 210 if (err == 0) { 208 - dev_err(dev, "Missing ssi-protocol driver\n"); 211 + dev_dbg(dev, "Missing ssi-protocol driver\n"); 209 212 err = -EPROBE_DEFER; 210 213 goto error3; 211 214 } else if (err < 0) { ··· 228 231 229 232 err = device_attach(&modem->cmt_speech->device); 230 233 if (err == 0) { 231 - dev_err(dev, "Missing cmt-speech driver\n"); 234 + dev_dbg(dev, "Missing cmt-speech driver\n"); 232 235 err = -EPROBE_DEFER; 233 236 goto error4; 234 237 } else if (err < 0) {
+11 -5
include/uapi/linux/hsi/cs-protocol.h
··· 76 76 }; 77 77 78 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 + 87 + /* 79 88 * Struct describing the layout and contents of the driver mmap area. 80 89 * This information is meant as read-only information for the application. 81 90 */ ··· 100 91 __u32 rx_ptr; 101 92 __u32 rx_ptr_boundary; 102 93 __u32 reserved3[2]; 103 - /* 104 - * if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic 105 - * timestamp taken when the last control command was received 106 - */ 107 - struct timespec tstamp_rx_ctrl; 94 + /* enabled with CS_FEAT_TSTAMP_RX_CTRL */ 95 + struct cs_timestamp tstamp_rx_ctrl; 108 96 }; 109 97 110 98 #define CS_IO_MAGIC 'C'