mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
msm: bbif-fsm9900: Add ADC and PRI clock rate change
Add ADC Clock rate change between 326.4 and 345.6 MHz. PRI rate to half these frequencies. Change-Id: I17b58e9aebc0c363a5f24b579639f4b4c30b4c26 Acked-by: Edward Rodrigues <erodrigu@qti.qualcomm.com> Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
This commit is contained in:
parent
08d9bbfd8b
commit
8a5747dc95
2 changed files with 29 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <linux/fsm_rfic.h>
|
||||
|
||||
|
@ -281,6 +282,29 @@ static long bbif_ioctl(struct file *file,
|
|||
}
|
||||
break;
|
||||
|
||||
case BBIF_IOCTL_SET_ADC_CLK:
|
||||
{
|
||||
unsigned int rate;
|
||||
|
||||
if (copy_from_user(&rate, argp, sizeof(unsigned int))) {
|
||||
pr_err("%s: Invalid rate %d\n", __func__, rate);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
switch (rate) {
|
||||
case 1:
|
||||
mpll10_326_clk_init();
|
||||
break;
|
||||
case 2:
|
||||
mpll10_345_clk_init();
|
||||
break;
|
||||
default:
|
||||
pr_err("%s: Unknown ADC RATE\n", __func__);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_err("%s: Invalid IOCTL\n", __func__);
|
||||
return -EINVAL;
|
||||
|
|
|
@ -20,6 +20,8 @@ void fsm9900_gluon_init(void);
|
|||
void fsm9900_rfic_init(void);
|
||||
void fsm9900_mtr_init(void);
|
||||
|
||||
void mpll10_326_clk_init(void);
|
||||
void mpll10_345_clk_init(void);
|
||||
|
||||
/*
|
||||
* Device interface
|
||||
|
@ -149,6 +151,9 @@ struct rfic_wfm_param {
|
|||
#define BBIF_IOCTL_SET_ADC_BW \
|
||||
_IOC(_IOC_WRITE, RFIC_IOCTL_MAGIC, 0x43, \
|
||||
sizeof(struct bbif_bw_param *))
|
||||
#define BBIF_IOCTL_SET_ADC_CLK \
|
||||
_IOC(_IOC_WRITE, RFIC_IOCTL_MAGIC, 0x44, \
|
||||
sizeof(unsigned int *))
|
||||
#define RFIC_IOCTL_SET_LDO \
|
||||
_IOC(_IOC_WRITE, RFIC_IOCTL_MAGIC, 0x50, \
|
||||
sizeof(unsigned int *))
|
||||
|
|
Loading…
Reference in a new issue