]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas256xsw-android/tas2562-stereo-android-driver.git/commitdiff
common sysfs node of bigdata TAS2562_v1.1
authorPeeyush Gupta <a0875211@ti.com>
Tue, 4 Feb 2020 04:20:06 +0000 (09:50 +0530)
committerPeeyush Gupta <a0875211@ti.com>
Tue, 4 Feb 2020 04:20:06 +0000 (09:50 +0530)
tas25xx-algo.c
tas25xx-algo.h

index 19d6789fc5f5e0be97f243c2aedc912de57820b1..c58a6a0aa0ea0572e5c91c4b7a21e07ff29b6aff 100644 (file)
@@ -386,6 +386,27 @@ static int tas25xx_save_calib_data(uint32_t *calib_rdc)
 }
 
 /*******************************Calibration Related Codes Start*************************************/
+/* Forward declerations */
+static ssize_t tas25xx_calib_calibration_store(struct device *dev,
+                                       struct device_attribute *attr,
+                                       const char *buf, size_t size);
+
+static ssize_t tas25xx_calib_calibration_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_calib_status_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_calib_rdc_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_amb_temp_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
 static void calib_work_routine(struct work_struct *work)
 {
        uint8_t iter = 0, iter2 = 0;
@@ -602,6 +623,19 @@ static struct attribute_group tas25xx_calib_attr_grp = {
 
 /*******************************Calibration Related Codes End*************************************/
 /*******************************Validation Related Codes Start*************************************/
+/* Forward Declarations */
+static ssize_t tas25xx_valid_validation_store(struct device *dev,
+                                       struct device_attribute *attr,
+                                       const char *buf, size_t size);
+
+static ssize_t tas25xx_valid_validation_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_valid_status_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
 static void valid_work_routine(struct work_struct *work)
 {
        uint8_t iter = 0;
@@ -726,6 +760,30 @@ static struct attribute_group tas25xx_valid_attr_grp = {
 };
 /*******************************Validation Related Codes End*************************************/
 /*******************************BigData Related Codes Start*************************************/
+/* Forward Declarations */
+static ssize_t tas25xx_bd_exc_max_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_bd_exc_max_persist_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_bd_exc_over_count_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_bd_temp_max_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_bd_temp_max_persist_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
+
+static ssize_t tas25xx_bd_temp_over_count_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf);
 
 static DEVICE_ATTR(exc_max, 0664, tas25xx_bd_exc_max_show,
                                NULL);
@@ -951,6 +1009,10 @@ void tas25xx_parse_algo_dt(struct device_node *np)
        return;
 }
 
+struct tas25xx_algo *smartamp_get_sysfs_ptr(void)
+{
+       return p_tas25xx_algo;
+}
 
 void smartamp_add_algo(uint8_t channels)
 {
index 8ad718d7ab612e4aa0ffc454086032d6d20f3106..41f6ccf9f69e06a54a2ef176161a2e21ea965f8e 100644 (file)
@@ -76,61 +76,6 @@ struct tas25xx_algo {
        bool calib_update[MAX_CHANNELS];
 };
 
-
-static ssize_t tas25xx_calib_calibration_store(struct device *dev,
-                                       struct device_attribute *attr,
-                                       const char *buf, size_t size);
-
-static ssize_t tas25xx_calib_calibration_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_calib_status_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_calib_rdc_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_amb_temp_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_valid_validation_store(struct device *dev,
-                                       struct device_attribute *attr,
-                                       const char *buf, size_t size);
-
-static ssize_t tas25xx_valid_validation_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_valid_status_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_bd_exc_max_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_bd_exc_max_persist_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_bd_exc_over_count_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_bd_temp_max_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_bd_temp_max_persist_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
-
-static ssize_t tas25xx_bd_temp_over_count_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf);
+struct tas25xx_algo *smartamp_get_sysfs_ptr(void);
 
 #endif /* _TAS25XX_ALGO_H */
\ No newline at end of file