Add GC2395/CAMSS rear camera driver and fix audio, earpiece, micbias, and modem routing

This commit is contained in:
Luxferre
2026-10-19 23:34:06 +03:00
parent a6e3fa184f
commit a14a7aa543
20 changed files with 1623 additions and 49 deletions
+30 -11
View File
@@ -188,20 +188,39 @@ static void msm8905_pon_lookup_regmap(void)
{
struct device_node *np;
struct platform_device *pon_pdev;
struct platform_device *codec_pdev;
struct regmap *codec_regmap = NULL;
np = of_find_compatible_node(NULL, NULL, "qcom,pm8916-pon");
if (!np)
return;
if (np) {
pon_pdev = of_find_device_by_node(np);
of_node_put(np);
if (pon_pdev) {
if (pon_pdev->dev.parent)
pon_regmap = dev_get_regmap(pon_pdev->dev.parent, NULL);
put_device(&pon_pdev->dev);
}
}
pon_pdev = of_find_device_by_node(np);
of_node_put(np);
if (!pon_pdev)
return;
if (pon_pdev->dev.parent)
pon_regmap = dev_get_regmap(pon_pdev->dev.parent, NULL);
put_device(&pon_pdev->dev);
/*
* Configure PM8909 WCD analog codec (USID 1):
* - CDC_A_MICB_1_VAL (0xf141) = 0x60 (2.8V micbias for internal MEMS mic)
* - CDC_A_RX_EAR_CTL (0xf1c0) |= 0x20 (+6 dB EAR PA gain for earpiece)
*/
np = of_find_compatible_node(NULL, NULL, "qcom,pm8916-wcd-analog-codec");
if (np) {
codec_pdev = of_find_device_by_node(np);
of_node_put(np);
if (codec_pdev) {
if (codec_pdev->dev.parent)
codec_regmap = dev_get_regmap(codec_pdev->dev.parent, NULL);
put_device(&codec_pdev->dev);
}
}
if (codec_regmap) {
regmap_write(codec_regmap, 0xf141U, 0x60U);
regmap_update_bits(codec_regmap, 0xf1c0U, 0x20U, 0x20U);
}
}
static int __init msm8905_torch_init(void)