qup_i2c: Move to new clock APIs

Replace use of clk_enable() and clk_disable() with calls to
clk_prepare_enable() and clk_disable_unprepare(), respectively.

Change-Id: Ib29b5e4340f1a8cbde85efe3d129470788cbf0cd
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>

Conflicts:
	drivers/i2c/busses/i2c-qup.c
qup_i2c: Enabling CORE_ON_EN bit while disabling the QuPE PCLKs

To disable the GSBI QuPE PCLKs it is important to enable
the CORE_ON_EN bit for some targets like 7x27a.

CRs-Fixed: 302634
Change-Id: I309d7aa0de435b18658e3bb1a879368d06610c5e
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
qup_i2c: Remove Soc specific check while enabling CORE_ON_EN bit

Enabling of CORE_ON_EN bit in qup_i2c driver is not dependent on soc.
Same code will work for all. Hence remove the SOC specific part from the
function.

CRs-Fixed: 335884
Change-Id: I55054b0c17e1710c1d268322f1a78c42c94b3db8
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
qup_i2c: Use clk_prepare, clk_unprepare APIs correctly.

clk_unprepare cannot be called from timer context since the call may
block.

Change-Id: I7decb011031231046c4f0b822b3f47ed086bd7df
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
i2c: qup: Add Device tree support for Qualcomm I2C controller

Device tree support is added for Qualcomm I2C controller and
documentation is provided for required and optional device-node
properties.
Slave devices can be added using register_board_info (boards file),
or by listing them as child of I2C of_node in the device tree.

Change-Id: I10e9b8c7805c49dfe6a51975129f1599bbca84eb
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
qup_i2c: Reset QUP before registering for interrupts.

If bootloaders leave a pending interrupt on certain GSBI's,
the driver registers for an interrupt handler during boot up.
The interrupt handler immediately fires because the interrupt was
triggered in the bootloader. The ahb clock is also off at this time,
hence any register writes in the interrupt handler does not go through.
Thus we loop forever in the interrupt handler effectively hanging the
device.

CRs-Fixed: 345805
Change-Id: I5545785142a39f8b78132745e74dfc55a8a5c917
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
qup_i2c: Set the clock rate before enabling the clock.

There is a warning during boot up since the driver
enables the QUP clock before setting its rate. Hence,
make sure clock rate is set for applicable targets to
fix warning.

Change-Id: I249d642f5f14c5ff627c00766f9d399f48f55610
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
pn544: Add ioctl support

Ioctl support is required by userspace to power on the nfc chip.

Change-Id: I7c7b8a363c26bffeea6cbd990ce607913088898c