misc: modem_if: Add modem interface driver

1. Update modem interface driver based on TI HSI patch.
	- TI HSI patch
	: Change I01715849: omap4: hsi driver initial commit
	: Change I14d257ae: ARM: omap: tuna: add HSI support
        : Change Icebb37db: omap4: enable hsi hwmod
        : Change Iec8eef73: tuna: defcoinfig: enable HSI
2. Checked Modem BootUp and MIPI communication working.

Change-Id: I75a2d960f3a66004fa81743fae931f04bd4f0c07
Signed-off-by: wonhee <wonhee48.seo@samsung.com>

Conflicts:
	drivers/misc/Kconfig
	drivers/misc/Makefile
misc: modem_if: Reduce verbosity

Change-Id: I656e8d74e370548069c99be825cc0f430da62810
Signed-off-by: Benoit Goby <benoit@android.com>
maguro: misc: modem_if: mipi_link: Update mipi-hsi link device

1. Add wakelock while tx/rx datas.
	- prevent to goto suspend while communicating
2. Control ACWAKE even when receive data for performance & stabilization.
3. Remove ACREADY mux setting when CAWAKE goes down.
	- it's useless.
4. Add recover logic from mipi communication broken - patch set 2.
5. Move wake_lock_init before hsi_init - patch set 3.

Change-Id: I628bfce6a2d99ebf5bd133e24d1153b1e4efc6f9
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
misc: modem_if: Fix BUG in modem_probe if link init fails

kernel BUG at mm/slub.c:2943!

Change-Id: I83f675b053343a3032bd8fa032c11a4a39d02ba2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
maguro: misc: modem_if: mipi_link: Update mipi-hsi link device

1. Fix missing ACWAKE down for sleep mode.
	- Whenever receive data, it raise ACWAKE,
	but we missed ACWAKE down for this case.

Change-Id: Id6b76e260d6c6016e0b546909cb1141611fdf319
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
misc: modem_if: Update modem interface iodevice

1. Fix efs receive error
	- When receive large rfs data, sometimes it cannot end from while loop.
2. Add check logic for fragmentation packet from link device
3. Add mutex for tx/rx ioctl
4. Fix error for handling of fragmentation head data. - patch set 2.
5. Remove mutex from item 3. - patch set 3.
6. Change Send/Recv to read/write func instead ioctl. - patch set 4.
	- We need to modify RIL by below patch.
	=> https://partner.source.android.com/g/#/c/7413/
7. Fix checkting logic, check count for read. - patch set 5.
	- We need to modify RIL
	=> read(fp, buf, 0) -> read(fp, buf, alloc_size);

Change-Id: I74b8a03e9e2d8e07ed6dd9dc2412d4bd6afbf8aa
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
maguro: misc: modem_if: mipi_link: Update mipi-hsi link device

1. Remove work_pending().
2. Add locking for list_cmd_lock.
	- fix crash issue.
3. Add error return.
	- missed return in default case in switch loop.
4. Modify review comment.	- patch set 2
	- add list_empty before calling list_entry
	- protect list_del
5. Modify review comment.	- patch set 3

Change-Id: I40931efc8a401f7716c3ae6261ded57e32d99b86
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
misc: modem_if: iodevice: Add checking ip version

1. Add checking logic ip version.
	- ipv4 and ipv6 (0x40, 0x60)

Change-Id: I5e209eee1b6e9bb130d27748ce9ab26d81c3bd91
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
MODEM_IF: omap4: tuna: toro: Added CDMA modem interface driver

Patch set 5
1. modem link driver for dpram
2. cbp7.1 CDMA modem control driver

Change-Id: I75868384e22912e90b199aaf4cd49f3e01360842
Signed-off-by: j.h.hyun <j.h.hyun@samsung.com>
MODEM_IF: omap4: tuna: Modem IF: Update modem interface(lte- usb) driver

1. Update code regarding lte-usb modem interface
2. Updated files
- modemctl : modem_modemctl_device_cmc221.c
- modem_link_device : modem_link_device_usb.c , modem_link_device_usb.h
- header : modem.h

Change-Id: Ifa77ac84835407ce928f16b51e83c6defe6a15cf
Signed-off-by: dongjinseo <dejay.seo@samsung.com>
MODEM_IF: omap4: tuna: Modem IF: SPI driver for LTE boot

These are special functions to send the LTE(CMC221) bootloader and usbloader to the LTE Modem
- LTE Modem(CMC221) has no flash Memory, so bootloader must be loaded from AP
- At runtime AP-LTE inteface is USB ,
  but there is no USB driver at LTE Modem romboot,
  so we have to use SPI interface to load the LTE Modem bootloader and usbloader.
- Because these are special functions and the only usage is to send bootloader/usbloader,these functions does not comply with normal MODEM_IF( io/link/modemctl layer)

Change-Id: I82d085707102a80d061af398f06d87fd76754348
Signed-off-by: dongjinseo <dejay.seo@samsung.com>
misc: modem_if: Build lte_modem_bootloader

Change-Id: I6d1219943dad220eac682c9797c017eeab6518ea
Signed-off-by: Benoit Goby <benoit@android.com>
misc: modem_if: Reduce verbosity

Change-Id: I3531fd2c92860e161690fe9686967aea0aa9f690
Signed-off-by: Benoit Goby <benoit@android.com>
MODEM_IF:omap4:toro:Remove workqueue for rpm start

& workaround codes related with modem booting bug

1. Remove delayed work queue not to wait
   10secs delay for modem booting bug by changing position
   and checking modem booting status.
2. Remove disable->enble irq and change unnecessary
   workaround code to check modem booting status.

Change-Id: I2aec43f5c79570e180a0d2b4deb7a171e80433b6
Signed-off-by: eelhyoung.choi <eelhyoung.choi@samsung.com>
modem_if: usb_link: Fix usbdev ref counting

Since the link driver uses usb_driver_claim_interface to claim all the
interfaces, _probe will be called only once. But _disconnect will be
called for all 3 interfaces. put the usbdev when the last interface is
disconnected. This fixes a use after free.

Change-Id: I3ea46871c287f7a2cf7127e8ad0e6c7f0f90a327
Signed-off-by: Benoit Goby <benoit@android.com>
modem_if: Prevent crash if data received on unregistered channel

Change-Id: I72f6c698cc2d37bc468af9d6ac39744c86516be2
Signed-off-by: Benoit Goby <benoit@android.com>
misc: modem_if: Update modem interface driver

1. Move platform data into each modem control driver.
	- each modem control needs different platform data
2. Fix giving correct io-device pointer to modem control device.
	- when get modem status change event, only ril need to check it
3. Add release func in modem io-device.
	- add terminate_comm func in release func
4. Remove 'IOCTL_MODEM_START' command in io-device.
	- will remove it after ril change
	- temporarily give return 0

Change-Id: I599a3ab7df805cb86cc767fea81c0ddc29acf860
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
maguro: misc: modem_if: mipi_link: Fix useless control ACWAKE line

1. Remove useless ACWAKE control.
	- for performance.
2. Add spin_lock for acwake private data. - patch set 2
3. Use spin_lock_bh instead spin_lock_irq. - patch set 3
4. Add sending close command for command data. - patch set 4
	- command data : channel 4

Change-Id: Ibbbbca42dc246d6036a7bd38ce1c3e4a61ffdaa2
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
MODEM_IF:omap4:toro:Implement via download by GOTA

1. Implement via-cdma download at recovery mdoe (GOTA)

Change-Id: Ie9be33024526785ad314ffeb0a2e1f8928fe0da3
Signed-off-by: p5397.park <p5397.park@samsung.com>
modem_if: usb_link: Interrupt handlers can't return errors

Change-Id: Icd1f83086a021646cadb7ac2a4309bfa8f426897
Signed-off-by: Benoit Goby <benoit@android.com>