Commit Graph

643295 Commits

Author SHA1 Message Date
zwx342317 3db63453bc Drivers/DRM: support display function for hikey970.
Add HDMI & LCD driver code use DRM/KMS subsystem for hikey970.

Signed-off-by: cailiwei@hisilicon.com
Signed-off-by: zhangxiubin1@huawei.com
2018-03-02 15:24:14 +08:00
zwx305167 4c2a034fd7 MALI: Hikey970 GPU Dirver Porting 2018-03-02 15:21:49 +08:00
Li Wei b743e0961e BACKPORT: staging: android: ion: Stop butchering the DMA address
Now that we have proper caching, stop setting the DMA address manually.
It should be set after properly calling dma_map.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 62b3a094cb9e4a3c5a5be4a20b72e0ced3af0e31)
Signed-off-by: Li Wei <liwei213@huawei.com>
2018-03-02 14:12:45 +08:00
Li Wei a92f30866f BACKPORT: staging: android: ion: Remove crufty cache support
Now that we call dma_map in the dma_buf API callbacks there is no need
to use the existing cache APIs. Remove the sync ioctl and the existing
bad dma_sync calls. Explicit caching can be handled with the dma_buf
sync API.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5dc3bafb4217e021a38fe67445dac5b659909c36)
Signed-off-by: Li Wei <liwei213@huawei.com>
2018-03-02 14:12:45 +08:00
Li Wei a065b7aaa8 BACKPORT: staging: android: ion: Call dma_map_sg for syncing and mapping
Technically, calling dma_buf_map_attachment should return a buffer
properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to
ensure this happens. As a side effect, this lets Ion buffers take
advantage of the dma_buf sync ioctls.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2a55e7b5e5446c970e00be1bca8536f4a58bf21c)
Signed-off-by: Li Wei <liwei213@huawei.com>
2018-03-02 14:12:44 +08:00
Laura Abbott e0ac735734 BACKPORT: staging: android: ion: Duplicate sg_table
Ion currently returns a single sg_table on each dma_map call. This is
incorrect for later usage.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 17fd283f3870dd63c91c99591aab14e21799c119)
Signed-off-by: Li Wei <liwei213@huawei.com>
2018-03-02 14:12:44 +08:00
wanghaoxiang1 ab5d241d7b eth: hisilicon: Solve the "no buffer space available" problem of Ethernet 2018-03-01 15:12:03 +08:00
Yao Chen 1bc151858c Drivers/PCIe: Fix the failure of enumerating devices under root subordinate
Bugfix for the commit of a20c7f36bd3d ("PCI: Do not allocate more buses than available in
parent").With this patch enumeration stops digging deeper downstream as soon as bus num 0x01 has been assigned, which is always the case for a bridge device.This results in all devices behind a bridge bus to remain undetected, as these would be connected to bus 0x02 or higher.

Reference to https://patchwork.ozlabs.org/patch/857566/

Signed-off-by: Yao Chen <chenyao11@huawei.com>
2018-03-01 10:40:01 +08:00
Wanglai Shi a5e090208b dts: arm64: Add CoreSight trace support for kirin970 included
This patch includes the CoreSight dts into the device tree.
2018-02-28 13:18:43 +08:00
Wanglai Shi d5222b5ab6 dts: arm64: Add CoreSight trace support for kirin970
This patch adds devicetree entries for the CoreSight trace components
on the kirin970.
2018-02-28 13:18:43 +08:00
Wanglai Shi 1a4bac00ad coresight: ETM: Add support for ARM Cortex-A73
Add ARM Cortex A-73 ETM PIDs to the known ETM ips. While at it
also add description of the CPU to which the ETM belongs, to make
it easier to identify the ETM devices.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
2018-02-28 13:18:42 +08:00
Mathieu Poirier b667a2035b coresight: tmc: implementing TMC-ETR AUX space API
This patch implement the AUX area interfaces required to
use the TMC (configured as an ETR) from the Perf sub-system.

The ETR is configured to work with contiguous memory only.
Although not optimal, it allows the IP block to be used
while the scatter-gather mode of operation is being worked
on.

The heuristic is heavily borrowed from the ETB10 and TMC-ETF
implementation.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit ea817df0ff9e657c2bc1014787562dbf49bfdccd)
2018-02-28 13:18:41 +08:00
Quentin Lambert 61c6ef2dc8 coresight: perf: Add a missing call to etm_free_aux
Most error branches following the call to alloc_event_data contain a call
to etm_free_aux. This patch add a call to etm_free_aux to an error branch
that does not call it.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit 285fb22a8f3b242727da09d43262ef8dfd6424dd)
2018-02-28 13:18:41 +08:00
Suzuki K. Poulose 1825a7db86 coresight: tmc: Remove duplicate memset
The tmc_etr_enable_hw() fills the buffer with 0's before enabling
the hardware. So, we don't need an explicit memset() in
tmc_enable_etr_sink_sysfs() before calling the tmc_etr_enable_hw().
This patch removes the explicit memset from tmc_enable_etr_sink_sysfs.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit 80445970ae1c928e503aefc66033e825b9668884)
2018-02-28 13:18:41 +08:00
Suzuki K. Poulose d0d63cb9c1 coresight: tmc: Get rid of mode parameter for helper routines
Get rid of the superfluous mode parameter and the check for
the mode in tmc_etX_enable_sink_{perf/sysfs}. While at it, also
remove the unnecessary WARN_ON() checks.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit 63c0930d10ced04a542a526c9641b512d4074f02)
2018-02-28 13:18:40 +08:00
Suzuki K. Poulose 701f480ade coresight: tmc: Cleanup operation mode handling
The mode of operation of the TMC tracked in drvdata->mode is defined
as a local_t type. This is always checked and modified under the
drvdata->spinlock and hence we don't need local_t for it and the
unnecessary synchronisation instructions that comes with it. This
change makes the code a bit more cleaner.

Also fixes the order in which we update the drvdata->mode to
CS_MODE_DISABLED. i.e, in tmc_disable_etX_sink we change the
mode to CS_MODE_DISABLED before invoking tmc_disable_etX_hw()
which in turn depends on the mode to decide whether to dump the
trace to a buffer.

Applies on mathieu's coresight/next tree [1]

https://git.linaro.org/kernel/coresight.git next

Reported-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@broadcom.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit 034cd3ad350f05718a11271b64ec7634edafe89a)
2018-02-28 13:18:40 +08:00
Mathieu Poirier 1b3b4dca3e coresight: reset "enable_sink" flag when need be
When using coresight from the perf interface sinks are specified
as part of the perf command line.  As such the sink needs to be
disabled once it has been acknowledged by the coresight framework.
Otherwise the sink stays enabled, which may interfere with other
sessions.

This patch removes the sink selection check from the build path
process and make it a function on it's own.  The function is
then used when operating from sysFS or perf to determine what
sink has been selected.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit 286665518b31be5f7b8e27fe7468941438046d16)
2018-02-28 13:18:40 +08:00
Yao Chen a27c9208e8 Drivers/PCIe: change mode of pcie driver files
This patch change the mode of pcie driver files

Signed-off-by: Yao Chen <chenyao11@huawei.com>
2018-02-14 12:12:35 +08:00
wanghaoxiang1 c2ddf9217f eth: hisilicon: hikey970: enable r8168 Ethernet driver for hikey970 2018-02-13 15:33:34 +08:00
liwei213 33bca63281 drivers/scsi:ufs: enable the ufs feature
Open the kernel macros of ufs for hikey platform.

Signed-off-by: liwei213 <liwei213@huawei.com>
2018-02-13 15:17:58 +08:00
liwei213 c021aabeff drivers/scsi:ufs:add hikey970 ufs driver
Modify ufs driver to support both hikey960 and hikey970.

Signed-off-by: liwei213 <liwei213@huawei.com>
2018-02-13 15:09:43 +08:00
mwx533604 b20a70bf85 Drivers/CAN: support can bus function for hikey970.
Add CAN code in kernel to support can bus for hikey970.

Signed-off-by: mwx533604 <mwx533604@notesmail.huawei.com>
2018-02-12 22:07:35 +08:00
c00354815 698e0b3159 Drivers/PCIe: support pcie function for hikey970
Add PCIe code in kernel to support PCIe for hikey970

Signed-off-by: Yao Chen <chenyao11@huawei.com>
2018-02-12 21:54:31 +08:00
Roger Quadros e04a0e9faa usb: udc: allow adding and removing the same gadget device
allow usb_del_gadget_udc() and usb add_gadget_udc() to be called
repeatedly on the same gadget->dev structure.

We need to clear the gadget->dev structure so that kobject_init()
doesn't complain about already initialized object.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-02-12 21:54:07 +08:00
Yu Chen 980f4daeea dts: hisilicon: hikey970: enable i2c1 in kirin970.dtsi
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:54:06 +08:00
Yu Chen 31f1e4fabf hikey970_defconfig: turn on some configs to support usb of hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:54:06 +08:00
Yu Chen 63d9726572 usb: pd: optimize hisi pd code
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:40 +08:00
Yu Chen cc157f58ba misc: hisi_hikey_usb: add support for hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:40 +08:00
Yu Chen 4d2515a2ba usb: dwc3: dwc3 controller of kirin970 need more delay for ep command
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:39 +08:00
Yu Chen 077a5b3771 usb: dwc3: dwc3-hisi add support for PM_SLEEP on hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:39 +08:00
Yu Chen 0c19ed5549 phy: phy-kirin970-usb3: fix some error of usb phy init for hikey970
Signed-off-by: chenyu <chenyu56@huawei.com>
2018-02-12 21:47:38 +08:00
Kevin Wangtao 5c26bd0d3d dts: arm64: add thermal zone for kirin970
This patch adds thermal zone to bind thermal sensor with CPU cooling
device

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:41 +08:00
Kevin Wangtao 22400906fd dts: arm64: add gpu support for kirin970
This patch enable gpu on kirin970

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:41 +08:00
Kevin Wangtao 4248d89046 PM / devfreq: hisi: add ddr devfreq support for kirin970
This patch adds the support for ddr devfreq on the kirin970 SoC,
make it possible to control the ddr frequency through devfreq
interface or PMQOS.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:40 +08:00
Kevin Wangtao 9e266823ff thermal/drivers/hisi: Add support for kirin970
This patch adds the support for thermal sensor on the kirin970 SoC.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:40 +08:00
Kevin Wangtao 0f9cb51ad7 cpufreq: hisi-acpu: add support for kirin970
Enable cpufreq-dt driver for krin970.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:40 +08:00
Kevin Wangtao aa571f7872 BACKPORT: thermal/drivers/hisi: Add support for hi3660 SoC
This patch adds the support for thermal sensor on the Hi3660 SoC.
Hi3660 tsensor support alarm in alarm threshold, it also has a configurable
hysteresis interval, interrupt will be triggered when temperature rise above
the alarm threshold or fall below the hysteresis threshold.

Change-Id: Ia745bd0777e40bd46eb206031aae52bad714a801
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 2bb60a8ea721900c13b580689d647a6423e88104)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:39 +08:00
Kevin Wangtao 2fbea1d6ed BACKPORT: thermal/drivers/hisi: Prepare to add support for other hisi platforms
For platform compatibility, add the tsensor ops to a thermal data
structure. Each platform has its own probe function to register proper
tsensor ops function to the pointer, platform related resource request
are also implemented in the platform probe function.

Change-Id: I5c9f006884aa3ebe5df7a07cde41980a62168e84
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit a160a465297362c515db28848b79eb876ceab9c0)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:39 +08:00
Kevin Wangtao 76d2eef2e4 BACKPORT: thermal/drivers/hisi: Add platform prefix to function name
As the next patches will provide support for the hikey3660's sensor,
several functions with the same purpose but for different platforms will
be introduced.

In order to make a clear distinction between them, let's prefix the
function names with the platform name.

This patch has no functional changes, only name changes.

Change-Id: I3364f730a80944441dc34094493146ee1990548b
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 5ed82b79e526f755bf0630a7c47a31ca2f4a7ad5)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:39 +08:00
Kevin Wangtao 7c2a04f072 BACKPORT: thermal/drivers/hisi: Put platform code together
Reorganize the code for next patches by moving the functions upper in
the file which will prevent a forward declaration. There is no functional
change here.

Change-Id: I3eb1665e91bf768a2536653a29699db1460b4643
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit a0678da82ca01771db57f53bfb7f0a5a7494900e)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:38 +08:00
Kevin Wangtao cde9c481e6 BACKPORT: thermal/drivers/hisi: Use round up step value
Use round up division to ensure the programmed value of threshold and the lag
are not less than what we set, and in order to keep the accuracy while using
round up division, the step value should be a rounded up value.  There is
no need to use hisi_thermal_round_temp.

Change-Id: I1b064d0a000fde3e64f42ac152b54ffdacb45d5e
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit e42bbe1160c3b5fcab8d5afcc49d8647adff6c9c)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:38 +08:00
Kevin Wangtao 20c97c1865 BACKPORT: thermal/drivers/hisi: Move the clk setup in the corresponding functions
The sensor's clock is enabled and disabled outside of the probe and
disable function. Moving the corresponding action in the
hisi_thermal_setup() and hisi_thermal_disable_sensor(), factors out
some lines of code and makes the code more symmetric.

Change-Id: If40b040a6b54187065b1d99c40b203f96fd5840e
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 943c0f6abfb6010065b80943356975885a33233c)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:37 +08:00
Daniel Lezcano a08e18f4cd BACKPORT: thermal/drivers/hisi: Remove mutex_lock in the code
The mutex is used to protect against writes in the configuration register.

That happens at probe time, with no possible race yet.

Then when the module is unloaded and at suspend/resume.

When the module is unloaded, it is an userspace operation, thus via a process.
Suspending the system goes through the freezer to suspend all the tasks
synchronously before continuing. So it is not possible to hit the suspend ops
in this driver while we are unloading it.

The resume is the same situation than the probe.

In other words, even if there are several places where we write the
configuration register, there is no situation where we can write it at the same
time, so far as I can judge

Change-Id: Ie71c809f485240dbf463b142fe0f3ab1d2fae2ae
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit cc1ab38d2b2ad3290426c2234cf83e7a323554c7)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:37 +08:00
Daniel Lezcano d5c2e73ce6 BACKPORT: thermal/drivers/hisi: Remove thermal data back pointer
The presence of the thermal data pointer in the sensor structure has the unique
purpose of accessing the thermal data in the interrupt handler.

The sensor pointer is passed when registering the interrupt handler, replace the
cookie by the thermal data pointer, so the back pointer is no longer needed.

Change-Id: I7b107fcbef723cc74b24aa45420ce12454d5800a
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 81d7cb7946f03d339244e1a822b7da246d8c79ff)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:37 +08:00
Daniel Lezcano 0b7229d810 BACKPORT: thermal/drivers/hisi: Convert long to int
There is no point to specify the temperature as long variable, the int is
enough.

Replace all long variables to int, so making the code consistent.

Change-Id: Iabed1d48fa61963bb2ef7ec13b018970fe96cff6
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit bc02ef6d98a601a39f735cbbb67807fb752b5138)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:36 +08:00
Daniel Lezcano fc5ab567af BACKPORT: thermal/drivers/hisi: Rename and remove unused field
Rename the 'sensors' field to 'sensor' as we describe only one sensor.
Remove the 'sensor_temp' as it is no longer used.

Change-Id: I1cbef35e4c0958b4882ae189e9c67d42f2cb627d
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 609f26dcbb340d7d6b30b1951c8b525611a97c20)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:35 +08:00
Daniel Lezcano 726b312ede BACKPORT: thermal/drivers/hisi: Remove costly sensor inspection
The sensor is all setup, bind, resetted, acked, etc... every single second.

That was the way to workaround a problem with the interrupt bouncing again and
again.

With the following changes, we fix all in one:

 - Do the setup, one time, at probe time

 - Add the IRQF_ONESHOT, ack the interrupt in the threaded handler

 - Remove the interrupt handler

 - Set the correct value for the LAG register

 - Remove all the irq_enabled stuff in the code as the interruption
   handling is fixed

 - Remove the 3ms delay

 - Reorder the initialization routine to be in the right order

It ends up to a nicer code and more efficient, the 3-5ms delay is removed from
the get_temp() path.

Change-Id: I73a357caed3a34cd1f4de594c724577b4146683c
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 10d7e9a9181f4637640f388d334c6740c1b5d0e8)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:35 +08:00
Daniel Lezcano 6976e5f1eb BACKPORT: thermal/drivers/hisi: Fix configuration register setting
The TEMP0_CFG configuration register contains different field to set up the
temperature controller. However in the code, nothing prevents a setup to
overwrite the previous one: eg. writing the hdak value overwrites the sensor
selection, the sensor selection overwrites the hdak value.

In order to prevent such thing, use a regmap-like mechanism by reading the
value before, set the corresponding bits and write the result.

Change-Id: Iecb3eb216337430842c1eb7eb5ff4cc35e8fcc43
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit b424315a287c70eeb5f920f84c92492bd2f5658e)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:34 +08:00
Daniel Lezcano 8cc767777c BACKPORT: thermal/drivers/hisi: Encapsulate register writes into helpers
Hopefully, the function name can help to clarify the semantic of the operations
when writing in the register.

Change-Id: I2f5c5f20c1f52763b94e4998f1c45d118b35c53e
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 1e11b014271ceccb5ea04ae58f4829ac8209a86d)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:34 +08:00
Daniel Lezcano f0610d7d49 BACKPORT: thermal/drivers/hisi: Remove pointless lock
The threaded interrupt inspect the sensors structure to look in the temp
threshold field, but this field is read-only in all the code, except in the
probe function before the threaded interrupt is set. In other words there
is not race window in the threaded interrupt when reading the field value.

Change-Id: I457c3b546a43bcf72a3f3d8b5cb1a27172f6a834
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit 2d4fa7b4c6f8080ced2e8237c9f46fb1fc110d64)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
2018-02-12 16:48:34 +08:00