HSI changes for the v4.6 series

* nokia-modem: add N950 and N9 support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJW6ZcAAAoJENju1/PIO/qafF0P/jXGXdXTAOIQKuPqhOZIM41T
 gpvDYxIYho5SCm6xbn6YxyGpUG7ENaVFSRB4iQDH8vzvscjpsTcwWFTMVs6ILV3e
 akbt8zpiKe1CbOQy7hT2sKUxSli87nlVqaksOMdMZbrIy/Z8KeiAWnDeTVQX04v/
 wTpeW/EnCHNk5vwFjZWwXnAy+imiP1ICmvdzWnbAK5du1KDMEQbJcKgG8hCcW5hg
 8mcddaFzhtQow9RURw0xpwj0qxcXAqPPK4s4Fb5I//LKpKucYHCuiDOaufdKDR3q
 Vgn7y9XU4ZY0gxFGWr4y7nuW7/C/ObXW8wHnS/JbfCvvZQ9NjOb84LBqi8nDVbl3
 Hdj1MQVKu7bpJ2IX9U/D298xWDk7RqIrV0BIZYqogpWWstQUjkMJaXXlUXzeIK1X
 DwKUYzxKJCJXllMkogqZMHJqtHlow/3FTqasr7v3rMMfu5JjqsRHdUDoZwc7PYQp
 3qSIdbfFQs146Q+3jIOw7fonc/KDqUR7XNWaWZCUhEhIQZ62g611fEyAJDgL3UVp
 Kl0vRMa1e5Zc5RBa7e8wfNF8s2LhSfH8jvwoP2224V7OgmyU2jrIzeP4vORBwWvb
 unSV4ZbvOY6Q8btKOtruHqB5ZSY2s741qiNxJMVOcEQMMFNdu0/YzCKpA5aq0NsA
 Jur0Z5I3vxXqFHUG9FSE
 =gBkN
 -----END PGP SIGNATURE-----

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

Pull HSI updates from Sebastian Reichel:
 "nokia-modem: add N950 and N9 support"

* tag 'hsi-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  HSI: ssi-protocol: Use handshake logic from n950
  HSI: nokia-modem: add n950 and n9 support
This commit is contained in:
Linus Torvalds 2016-03-17 12:58:11 -07:00
commit 3c0b8d1c5f
3 changed files with 14 additions and 16 deletions

View File

@ -7,6 +7,8 @@ properties are needed by the Nokia modem HSI client:
Required properties:
- compatible: Should be one of
"nokia,n900-modem"
"nokia,n950-modem"
"nokia,n9-modem"
- hsi-channel-names: Should contain the following strings
"mcsaab-control"
"speech-control"
@ -15,11 +17,11 @@ Required properties:
- gpios: Should provide a GPIO handler for each GPIO listed in
gpio-names
- gpio-names: Should contain the following strings
"cmt_apeslpx"
"cmt_rst_rq"
"cmt_en"
"cmt_rst"
"cmt_bsi"
"cmt_apeslpx" (for n900, n950, n9)
"cmt_rst_rq" (for n900, n950, n9)
"cmt_en" (for n900, n950, n9)
"cmt_rst" (for n900)
"cmt_bsi" (for n900)
- interrupts: Should be IRQ handle for modem's reset indication
Example:

View File

@ -281,6 +281,8 @@ static int nokia_modem_remove(struct device *dev)
#ifdef CONFIG_OF
static const struct of_device_id nokia_modem_of_match[] = {
{ .compatible = "nokia,n900-modem", },
{ .compatible = "nokia,n950-modem", },
{ .compatible = "nokia,n9-modem", },
{},
};
MODULE_DEVICE_TABLE(of, nokia_modem_of_match);

View File

@ -521,13 +521,7 @@ static void ssip_start_rx(struct hsi_client *cl)
* high transition. Therefore we need to ignore the sencond UP event.
*/
if ((ssi->main_state != ACTIVE) || (ssi->recv_state == RECV_READY)) {
if (ssi->main_state == INIT) {
ssi->main_state = HANDSHAKE;
spin_unlock(&ssi->lock);
ssip_send_bootinfo_req_cmd(cl);
} else {
spin_unlock(&ssi->lock);
}
spin_unlock(&ssi->lock);
return;
}
ssip_set_rxstate(ssi, RECV_READY);
@ -671,6 +665,7 @@ static void ssip_rx_bootinforeq(struct hsi_client *cl, u32 cmd)
ssip_error(cl);
/* Fall through */
case INIT:
case HANDSHAKE:
spin_lock(&ssi->lock);
ssi->main_state = HANDSHAKE;
if (!ssi->waketest) {
@ -688,9 +683,6 @@ static void ssip_rx_bootinforeq(struct hsi_client *cl, u32 cmd)
msg->complete = ssip_release_cmd;
hsi_async_write(cl, msg);
break;
case HANDSHAKE:
/* Ignore */
break;
default:
dev_dbg(&cl->device, "Wrong state M(%d)\n", ssi->main_state);
break;
@ -939,9 +931,11 @@ static int ssip_pn_open(struct net_device *dev)
ssi->waketest = 1;
ssi_waketest(cl, 1); /* FIXME: To be removed */
}
ssi->main_state = INIT;
ssi->main_state = HANDSHAKE;
spin_unlock_bh(&ssi->lock);
ssip_send_bootinfo_req_cmd(cl);
return 0;
}