mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-30 23:51:17 +00:00
sensors: Rename ADSP driver to SSC and move it to drivers/sensors
Rename sensors ADSP driver to sensors SSC and Move it from arch/arm/mach-msm to drivers/sensors as drivers/sensors is the most suitable home for this driver. Change-Id: I72ae3cfd86157aa2523a4c4d0bf9160f9f2915ae Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
678adbd072
commit
7163cc9450
@ -1,11 +0,0 @@
|
||||
* msm-adsp-sensors
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: "qcom,msm-adsp-sensors"
|
||||
|
||||
Example:
|
||||
|
||||
qcom,msm-adsp-sensors {
|
||||
compatible = "qcom,msm-adsp-sensors";
|
||||
};
|
11
Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt
Normal file
11
Documentation/devicetree/bindings/qdsp/msm-ssc-sensors.txt
Normal file
@ -0,0 +1,11 @@
|
||||
* msm-ssc-sensors
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: "qcom,msm-ssc-sensors"
|
||||
|
||||
Example:
|
||||
|
||||
qcom,msm-ssc-sensors {
|
||||
compatible = "qcom,msm-ssc-sensors";
|
||||
};
|
@ -3183,8 +3183,8 @@
|
||||
compatible = "qcom,msm-wfd";
|
||||
};
|
||||
|
||||
qcom,msm-adsp-sensors {
|
||||
compatible = "qcom,msm-adsp-sensors";
|
||||
qcom,msm-ssc-sensors {
|
||||
compatible = "qcom,msm-ssc-sensors";
|
||||
};
|
||||
|
||||
sound {
|
||||
|
@ -679,8 +679,8 @@
|
||||
qcom,wcnss-adc_tm = <&pm8226_adc_tm>;
|
||||
};
|
||||
|
||||
qcom,msm-adsp-sensors {
|
||||
compatible = "qcom,msm-adsp-sensors";
|
||||
qcom,msm-ssc-sensors {
|
||||
compatible = "qcom,msm-ssc-sensors";
|
||||
};
|
||||
|
||||
qcom,wdt@f9017000 {
|
||||
|
@ -1970,8 +1970,8 @@
|
||||
<11 604 32506 32506>;
|
||||
};
|
||||
|
||||
qcom,msm-adsp-sensors {
|
||||
compatible = "qcom,msm-adsp-sensors";
|
||||
qcom,msm-ssc-sensors {
|
||||
compatible = "qcom,msm-ssc-sensors";
|
||||
};
|
||||
|
||||
qcom,mss@fc880000 {
|
||||
|
@ -1786,8 +1786,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
qcom,msm-adsp-sensors {
|
||||
compatible = "qcom,msm-adsp-sensors";
|
||||
qcom,msm-ssc-sensors {
|
||||
compatible = "qcom,msm-ssc-sensors";
|
||||
};
|
||||
|
||||
qseecom: qcom,qseecom@7b00000 {
|
||||
|
@ -65,7 +65,7 @@ CONFIG_MSM_IPC_ROUTER_HSIC_XPRT=y
|
||||
CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -63,7 +63,7 @@ CONFIG_MSM_IPC_ROUTER_HSIC_XPRT=y
|
||||
CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -56,7 +56,7 @@ CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_MSM_OCMEM_NONSECURE=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -55,7 +55,7 @@ CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_MSM_OCMEM_NONSECURE=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -58,7 +58,7 @@ CONFIG_MSM_L2_SPM=y
|
||||
CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -62,7 +62,7 @@ CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_MSM_OCMEM_POWER_DISABLE=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y
|
||||
CONFIG_MSM_BOOT_STATS=y
|
||||
CONFIG_STRICT_MEMORY_RWX=y
|
||||
|
@ -61,7 +61,7 @@ CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_MSM_OCMEM_POWER_DISABLE=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y
|
||||
CONFIG_MSM_BOOT_STATS=y
|
||||
CONFIG_MSM_XPU_ERR_FATAL=y
|
||||
|
@ -58,7 +58,6 @@ CONFIG_MSM_MEMORY_DUMP=y
|
||||
CONFIG_MSM_DLOAD_MODE=y
|
||||
CONFIG_MSM_ADSP_LOADER=y
|
||||
CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y
|
||||
CONFIG_MSM_BOOT_STATS=y
|
||||
CONFIG_STRICT_MEMORY_RWX=y
|
||||
|
@ -55,7 +55,6 @@ CONFIG_MSM_MEMORY_DUMP=y
|
||||
CONFIG_MSM_DLOAD_MODE=y
|
||||
CONFIG_MSM_ADSP_LOADER=y
|
||||
CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_MSM_ENABLE_WDOG_DEBUG_CONTROL=y
|
||||
CONFIG_MSM_BOOT_STATS=y
|
||||
CONFIG_MSM_XPU_ERR_FATAL=y
|
||||
|
@ -66,7 +66,7 @@ CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y
|
||||
CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -65,7 +65,7 @@ CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y
|
||||
CONFIG_MSM_OCMEM=y
|
||||
CONFIG_MSM_OCMEM_LOCAL_POWER_CTRL=y
|
||||
CONFIG_MSM_OCMEM_DEBUG=y
|
||||
CONFIG_SENSORS_ADSP=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_MSM_CACHE_ERP=y
|
||||
CONFIG_MSM_L1_ERR_PANIC=y
|
||||
CONFIG_MSM_L1_RECOV_ERR_PANIC=y
|
||||
|
@ -1223,14 +1223,6 @@ config MSM_OCMEM_POWER_DISABLE
|
||||
Enable this configuration if OCMEM is being exclusively
|
||||
used as GMEM or OCIMEM.
|
||||
|
||||
config SENSORS_ADSP
|
||||
bool "Enable Sensors Driver Support for ADSP"
|
||||
help
|
||||
Add support for sensors ADSP driver.
|
||||
This driver is used for exercising different sensors use cases,
|
||||
such as for lower-power OCMEM use cases, and for time syncing
|
||||
with ADSP clock.
|
||||
|
||||
config USE_PINCTRL_IRQ
|
||||
default n
|
||||
bool "Use Pinctrl IRQ chip"
|
||||
|
@ -107,7 +107,6 @@ obj-$(CONFIG_MSM_EVENT_TIMER) += event_timer.o
|
||||
|
||||
obj-$(CONFIG_MSM_OCMEM) += ocmem.o ocmem_allocator.o ocmem_notifier.o
|
||||
obj-$(CONFIG_MSM_OCMEM) += ocmem_sched.o ocmem_api.o ocmem_rdm.o ocmem_core.o
|
||||
obj-$(CONFIG_SENSORS_ADSP) += sensors_adsp.o
|
||||
|
||||
obj-$(CONFIG_ARCH_MSM8974) += gpiomux-v2.o gpiomux.o
|
||||
obj-$(CONFIG_ARCH_MDM9630) += gpiomux-v2.o gpiomux.o
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef SENSORS_ADSP_H
|
||||
#define SENSORS_ADSP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#endif /* SENSORS_ADSP_H */
|
@ -167,3 +167,4 @@ obj-$(CONFIG_ESOC) += esoc/
|
||||
|
||||
obj-$(CONFIG_BIF) += bif/
|
||||
obj-$(CONFIG_SENSORS) += sensors/
|
||||
obj-$(CONFIG_SENSORS_SSC) += sensors/
|
||||
|
@ -3,3 +3,10 @@ config SENSORS
|
||||
help
|
||||
This option enables the sensor sysfs class in /sys/class/sensors.
|
||||
You'll need this to do anything useful with sensorss. If unsure, say N.
|
||||
|
||||
config SENSORS_SSC
|
||||
bool "Enable Sensors Driver Support for SSC"
|
||||
help
|
||||
Add support for sensors SSC driver.
|
||||
This driver is used for exercising sensors use case,
|
||||
time syncing with ADSP clock.
|
||||
|
@ -1 +1,2 @@
|
||||
obj-$(CONFIG_SENSORS) += sensors_class.o
|
||||
obj-$(CONFIG_SENSORS_SSC) += sensors_ssc.o
|
||||
|
@ -10,7 +10,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <mach/sensors_adsp.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/msm_dsps.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@ -26,13 +26,13 @@
|
||||
#define DRV_NAME "sensors"
|
||||
#define DRV_VERSION "2.00"
|
||||
|
||||
struct sns_adsp_control_s {
|
||||
struct sns_ssc_control_s {
|
||||
struct class *dev_class;
|
||||
dev_t dev_num;
|
||||
struct device *dev;
|
||||
struct cdev *cdev;
|
||||
};
|
||||
static struct sns_adsp_control_s sns_ctl;
|
||||
static struct sns_ssc_control_s sns_ctl;
|
||||
|
||||
/*
|
||||
* Read QTimer clock ticks and scale down to 32KHz clock as used
|
||||
@ -56,17 +56,17 @@ static u32 sns_read_qtimer(void)
|
||||
return (u32)val;
|
||||
}
|
||||
|
||||
static int sensors_adsp_open(struct inode *ip, struct file *fp)
|
||||
static int sensors_ssc_open(struct inode *ip, struct file *fp)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensors_adsp_release(struct inode *inode, struct file *file)
|
||||
static int sensors_ssc_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long sensors_adsp_ioctl(struct file *file,
|
||||
static long sensors_ssc_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -86,14 +86,14 @@ static long sensors_adsp_ioctl(struct file *file,
|
||||
return ret;
|
||||
}
|
||||
|
||||
const struct file_operations sensors_adsp_fops = {
|
||||
const struct file_operations sensors_ssc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = sensors_adsp_open,
|
||||
.release = sensors_adsp_release,
|
||||
.unlocked_ioctl = sensors_adsp_ioctl
|
||||
.open = sensors_ssc_open,
|
||||
.release = sensors_ssc_release,
|
||||
.unlocked_ioctl = sensors_ssc_ioctl
|
||||
};
|
||||
|
||||
static int sensors_adsp_probe(struct platform_device *pdev)
|
||||
static int sensors_ssc_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -122,7 +122,7 @@ static int sensors_adsp_probe(struct platform_device *pdev)
|
||||
pr_err("%s: cdev_alloc fail.\n", __func__);
|
||||
goto cdev_alloc_err;
|
||||
}
|
||||
cdev_init(sns_ctl.cdev, &sensors_adsp_fops);
|
||||
cdev_init(sns_ctl.cdev, &sensors_ssc_fops);
|
||||
sns_ctl.cdev->owner = THIS_MODULE;
|
||||
|
||||
ret = cdev_add(sns_ctl.cdev, sns_ctl.dev_num, 1);
|
||||
@ -145,7 +145,7 @@ res_err:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int sensors_adsp_remove(struct platform_device *pdev)
|
||||
static int sensors_ssc_remove(struct platform_device *pdev)
|
||||
{
|
||||
cdev_del(sns_ctl.cdev);
|
||||
kfree(sns_ctl.cdev);
|
||||
@ -157,29 +157,29 @@ static int sensors_adsp_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id msm_adsp_sensors_dt_match[] = {
|
||||
{.compatible = "qcom,msm-adsp-sensors"}
|
||||
static const struct of_device_id msm_ssc_sensors_dt_match[] = {
|
||||
{.compatible = "qcom,msm-ssc-sensors"}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, msm_adsp_sensors_dt_match);
|
||||
MODULE_DEVICE_TABLE(of, msm_ssc_sensors_dt_match);
|
||||
|
||||
static struct platform_driver sensors_adsp_driver = {
|
||||
static struct platform_driver sensors_ssc_driver = {
|
||||
.driver = {
|
||||
.name = "sensors-adsp",
|
||||
.name = "sensors-ssc",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = msm_adsp_sensors_dt_match,
|
||||
.of_match_table = msm_ssc_sensors_dt_match,
|
||||
},
|
||||
.probe = sensors_adsp_probe,
|
||||
.remove = sensors_adsp_remove,
|
||||
.probe = sensors_ssc_probe,
|
||||
.remove = sensors_ssc_remove,
|
||||
};
|
||||
|
||||
static int __init sensors_adsp_init(void)
|
||||
static int __init sensors_ssc_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
pr_debug("%s driver version %s.\n", DRV_NAME, DRV_VERSION);
|
||||
rc = platform_driver_register(&sensors_adsp_driver);
|
||||
rc = platform_driver_register(&sensors_ssc_driver);
|
||||
if (rc) {
|
||||
pr_err("%s: Failed to register sensors adsp driver\n",
|
||||
pr_err("%s: Failed to register sensors ssc driver\n",
|
||||
__func__);
|
||||
return rc;
|
||||
}
|
||||
@ -187,12 +187,12 @@ static int __init sensors_adsp_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit sensors_adsp_exit(void)
|
||||
static void __exit sensors_ssc_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&sensors_adsp_driver);
|
||||
platform_driver_unregister(&sensors_ssc_driver);
|
||||
}
|
||||
|
||||
module_init(sensors_adsp_init);
|
||||
module_exit(sensors_adsp_exit);
|
||||
module_init(sensors_ssc_init);
|
||||
module_exit(sensors_ssc_exit);
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("Sensors ADSP driver");
|
||||
MODULE_DESCRIPTION("Sensors SSC driver");
|
Loading…
Reference in New Issue
Block a user