Lines Matching +full:msm8996 +full:- +full:camss
1 // SPDX-License-Identifier: GPL-2.0
3 * camss.c
5 * Qualcomm MSM Camera Subsystem - Core
8 * Copyright (C) 2015-2018 Linaro Ltd.
12 #include <linux/media-bus-format.h>
24 #include <media/media-device.h>
25 #include <media/v4l2-async.h>
26 #include <media/v4l2-device.h>
27 #include <media/v4l2-mc.h>
28 #include <media/v4l2-fwnode.h>
30 #include "camss.h"
680 .regulators = { "vdda-phy", "vdda-pll" },
705 .regulators = { "vdda-phy", "vdda-pll" },
730 .regulators = { "vdda-phy", "vdda-pll" },
810 /* VFE-lite */
921 .regulators = { "vdda-phy", "vdda-pll" },
938 .regulators = { "vdda-phy", "vdda-pll" },
955 .regulators = { "vdda-phy", "vdda-pll" },
972 .regulators = { "vdda-phy", "vdda-pll" },
1173 .regulators = { "vdda-phy", "vdda-pll" },
1189 .regulators = { "vdda-phy", "vdda-pll" },
1205 .regulators = { "vdda-phy", "vdda-pll" },
1221 .regulators = { "vdda-phy", "vdda-pll" },
1237 .regulators = { "vdda-phy", "vdda-pll" },
1253 .regulators = { "vdda-phy", "vdda-pll" },
1269 .regulators = { "vdda-phy", "vdda-pll" },
1285 .regulators = { "vdda-phy", "vdda-pll" },
1484 * camss_add_clock_margin - Add margin to clock frequency rate
1497 * camss_enable_clocks - Enable multiple clocks
1521 for (i--; i >= 0; i--) in camss_enable_clocks()
1528 * camss_disable_clocks - Disable multiple clocks
1536 for (i = nclocks - 1; i >= 0; i--) in camss_disable_clocks()
1541 * camss_find_sensor - Find a linked media entity which represents a sensor
1551 pad = &entity->pads[0]; in camss_find_sensor()
1552 if (!(pad->flags & MEDIA_PAD_FL_SINK)) in camss_find_sensor()
1556 if (!pad || !is_media_entity_v4l2_subdev(pad->entity)) in camss_find_sensor()
1559 entity = pad->entity; in camss_find_sensor()
1561 if (entity->function == MEDIA_ENT_F_CAM_SENSOR) in camss_find_sensor()
1567 * camss_get_link_freq - Get link frequency from sensor
1582 return -ENODEV; in camss_get_link_freq()
1586 return v4l2_get_link_freq(subdev->ctrl_handler, bpp, 2 * lanes); in camss_get_link_freq()
1590 * camss_get_pixel_clock - Get pixel clock rate from sensor
1604 return -ENODEV; in camss_get_pixel_clock()
1608 ctrl = v4l2_ctrl_find(subdev->ctrl_handler, V4L2_CID_PIXEL_RATE); in camss_get_pixel_clock()
1611 return -EINVAL; in camss_get_pixel_clock()
1618 int camss_pm_domain_on(struct camss *camss, int id) in camss_pm_domain_on() argument
1622 if (id < camss->res->vfe_num) { in camss_pm_domain_on()
1623 struct vfe_device *vfe = &camss->vfe[id]; in camss_pm_domain_on()
1625 ret = vfe->res->hw_ops->pm_domain_on(vfe); in camss_pm_domain_on()
1631 void camss_pm_domain_off(struct camss *camss, int id) in camss_pm_domain_off() argument
1633 if (id < camss->res->vfe_num) { in camss_pm_domain_off()
1634 struct vfe_device *vfe = &camss->vfe[id]; in camss_pm_domain_off()
1636 vfe->res->hw_ops->pm_domain_off(vfe); in camss_pm_domain_off()
1640 static int vfe_parent_dev_ops_get(struct camss *camss, int id) in vfe_parent_dev_ops_get() argument
1642 int ret = -EINVAL; in vfe_parent_dev_ops_get()
1644 if (id < camss->res->vfe_num) { in vfe_parent_dev_ops_get()
1645 struct vfe_device *vfe = &camss->vfe[id]; in vfe_parent_dev_ops_get()
1653 static int vfe_parent_dev_ops_put(struct camss *camss, int id) in vfe_parent_dev_ops_put() argument
1655 if (id < camss->res->vfe_num) { in vfe_parent_dev_ops_put()
1656 struct vfe_device *vfe = &camss->vfe[id]; in vfe_parent_dev_ops_put()
1665 *vfe_parent_dev_ops_get_base_address(struct camss *camss, int id) in vfe_parent_dev_ops_get_base_address() argument
1667 if (id < camss->res->vfe_num) { in vfe_parent_dev_ops_get_base_address()
1668 struct vfe_device *vfe = &camss->vfe[id]; in vfe_parent_dev_ops_get_base_address()
1670 return vfe->base; in vfe_parent_dev_ops_get_base_address()
1683 * camss_of_parse_endpoint_node - Parse port endpoint node
1694 struct csiphy_lanes_cfg *lncfg = &csd->interface.csi2.lane_cfg; in camss_of_parse_endpoint_node()
1704 csd->interface.csiphy_id = vep.base.port; in camss_of_parse_endpoint_node()
1707 lncfg->clk.pos = mipi_csi2->clock_lane; in camss_of_parse_endpoint_node()
1708 lncfg->clk.pol = mipi_csi2->lane_polarities[0]; in camss_of_parse_endpoint_node()
1709 lncfg->num_data = mipi_csi2->num_data_lanes; in camss_of_parse_endpoint_node()
1711 lncfg->data = devm_kcalloc(dev, in camss_of_parse_endpoint_node()
1712 lncfg->num_data, sizeof(*lncfg->data), in camss_of_parse_endpoint_node()
1714 if (!lncfg->data) in camss_of_parse_endpoint_node()
1715 return -ENOMEM; in camss_of_parse_endpoint_node()
1717 for (i = 0; i < lncfg->num_data; i++) { in camss_of_parse_endpoint_node()
1718 lncfg->data[i].pos = mipi_csi2->data_lanes[i]; in camss_of_parse_endpoint_node()
1719 lncfg->data[i].pol = mipi_csi2->lane_polarities[i + 1]; in camss_of_parse_endpoint_node()
1726 * camss_of_parse_ports - Parse ports node
1732 static int camss_of_parse_ports(struct camss *camss) in camss_of_parse_ports() argument
1734 struct device *dev = camss->dev; in camss_of_parse_ports()
1739 for_each_endpoint_of_node(dev->of_node, node) { in camss_of_parse_ports()
1748 ret = -EINVAL; in camss_of_parse_ports()
1752 csd = v4l2_async_nf_add_fwnode(&camss->notifier, in camss_of_parse_ports()
1776 * camss_init_subdevices - Initialize subdev structures and resources
1777 * @camss: CAMSS device
1781 static int camss_init_subdevices(struct camss *camss) in camss_init_subdevices() argument
1783 const struct camss_resources *res = camss->res; in camss_init_subdevices()
1787 for (i = 0; i < camss->res->csiphy_num; i++) { in camss_init_subdevices()
1788 ret = msm_csiphy_subdev_init(camss, &camss->csiphy[i], in camss_init_subdevices()
1789 &res->csiphy_res[i], i); in camss_init_subdevices()
1791 dev_err(camss->dev, in camss_init_subdevices()
1792 "Failed to init csiphy%d sub-device: %d\n", in camss_init_subdevices()
1799 for (i = 0; i < camss->res->vfe_num; i++) { in camss_init_subdevices()
1800 ret = msm_vfe_subdev_init(camss, &camss->vfe[i], in camss_init_subdevices()
1801 &res->vfe_res[i], i); in camss_init_subdevices()
1803 dev_err(camss->dev, in camss_init_subdevices()
1804 "Fail to init vfe%d sub-device: %d\n", i, ret); in camss_init_subdevices()
1809 for (i = 0; i < camss->res->csid_num; i++) { in camss_init_subdevices()
1810 ret = msm_csid_subdev_init(camss, &camss->csid[i], in camss_init_subdevices()
1811 &res->csid_res[i], i); in camss_init_subdevices()
1813 dev_err(camss->dev, in camss_init_subdevices()
1814 "Failed to init csid%d sub-device: %d\n", in camss_init_subdevices()
1820 ret = msm_ispif_subdev_init(camss, res->ispif_res); in camss_init_subdevices()
1822 dev_err(camss->dev, "Failed to init ispif sub-device: %d\n", in camss_init_subdevices()
1831 * camss_link_entities - Register subdev nodes and create links
1832 * @camss: CAMSS device
1836 static int camss_link_entities(struct camss *camss) in camss_link_entities() argument
1841 for (i = 0; i < camss->res->csiphy_num; i++) { in camss_link_entities()
1842 for (j = 0; j < camss->res->csid_num; j++) { in camss_link_entities()
1843 ret = media_create_pad_link(&camss->csiphy[i].subdev.entity, in camss_link_entities()
1845 &camss->csid[j].subdev.entity, in camss_link_entities()
1849 dev_err(camss->dev, in camss_link_entities()
1850 "Failed to link %s->%s entities: %d\n", in camss_link_entities()
1851 camss->csiphy[i].subdev.entity.name, in camss_link_entities()
1852 camss->csid[j].subdev.entity.name, in camss_link_entities()
1859 if (camss->ispif) { in camss_link_entities()
1860 for (i = 0; i < camss->res->csid_num; i++) { in camss_link_entities()
1861 for (j = 0; j < camss->ispif->line_num; j++) { in camss_link_entities()
1862 ret = media_create_pad_link(&camss->csid[i].subdev.entity, in camss_link_entities()
1864 &camss->ispif->line[j].subdev.entity, in camss_link_entities()
1868 dev_err(camss->dev, in camss_link_entities()
1869 "Failed to link %s->%s entities: %d\n", in camss_link_entities()
1870 camss->csid[i].subdev.entity.name, in camss_link_entities()
1871 camss->ispif->line[j].subdev.entity.name, in camss_link_entities()
1878 for (i = 0; i < camss->ispif->line_num; i++) in camss_link_entities()
1879 for (k = 0; k < camss->res->vfe_num; k++) in camss_link_entities()
1880 for (j = 0; j < camss->vfe[k].res->line_num; j++) { in camss_link_entities()
1881 struct v4l2_subdev *ispif = &camss->ispif->line[i].subdev; in camss_link_entities()
1882 struct v4l2_subdev *vfe = &camss->vfe[k].line[j].subdev; in camss_link_entities()
1884 ret = media_create_pad_link(&ispif->entity, in camss_link_entities()
1886 &vfe->entity, in camss_link_entities()
1890 dev_err(camss->dev, in camss_link_entities()
1891 "Failed to link %s->%s entities: %d\n", in camss_link_entities()
1892 ispif->entity.name, in camss_link_entities()
1893 vfe->entity.name, in camss_link_entities()
1899 for (i = 0; i < camss->res->csid_num; i++) in camss_link_entities()
1900 for (k = 0; k < camss->res->vfe_num; k++) in camss_link_entities()
1901 for (j = 0; j < camss->vfe[k].res->line_num; j++) { in camss_link_entities()
1902 struct v4l2_subdev *csid = &camss->csid[i].subdev; in camss_link_entities()
1903 struct v4l2_subdev *vfe = &camss->vfe[k].line[j].subdev; in camss_link_entities()
1905 ret = media_create_pad_link(&csid->entity, in camss_link_entities()
1907 &vfe->entity, in camss_link_entities()
1911 dev_err(camss->dev, in camss_link_entities()
1912 "Failed to link %s->%s entities: %d\n", in camss_link_entities()
1913 csid->entity.name, in camss_link_entities()
1914 vfe->entity.name, in camss_link_entities()
1925 * camss_register_entities - Register subdev nodes and create links
1926 * @camss: CAMSS device
1930 static int camss_register_entities(struct camss *camss) in camss_register_entities() argument
1935 for (i = 0; i < camss->res->csiphy_num; i++) { in camss_register_entities()
1936 ret = msm_csiphy_register_entity(&camss->csiphy[i], in camss_register_entities()
1937 &camss->v4l2_dev); in camss_register_entities()
1939 dev_err(camss->dev, in camss_register_entities()
1946 for (i = 0; i < camss->res->csid_num; i++) { in camss_register_entities()
1947 ret = msm_csid_register_entity(&camss->csid[i], in camss_register_entities()
1948 &camss->v4l2_dev); in camss_register_entities()
1950 dev_err(camss->dev, in camss_register_entities()
1957 ret = msm_ispif_register_entities(camss->ispif, in camss_register_entities()
1958 &camss->v4l2_dev); in camss_register_entities()
1960 dev_err(camss->dev, "Failed to register ispif entities: %d\n", ret); in camss_register_entities()
1964 for (i = 0; i < camss->res->vfe_num; i++) { in camss_register_entities()
1965 ret = msm_vfe_register_entities(&camss->vfe[i], in camss_register_entities()
1966 &camss->v4l2_dev); in camss_register_entities()
1968 dev_err(camss->dev, in camss_register_entities()
1978 for (i--; i >= 0; i--) in camss_register_entities()
1979 msm_vfe_unregister_entities(&camss->vfe[i]); in camss_register_entities()
1982 msm_ispif_unregister_entities(camss->ispif); in camss_register_entities()
1984 i = camss->res->csid_num; in camss_register_entities()
1986 for (i--; i >= 0; i--) in camss_register_entities()
1987 msm_csid_unregister_entity(&camss->csid[i]); in camss_register_entities()
1989 i = camss->res->csiphy_num; in camss_register_entities()
1991 for (i--; i >= 0; i--) in camss_register_entities()
1992 msm_csiphy_unregister_entity(&camss->csiphy[i]); in camss_register_entities()
1998 * camss_unregister_entities - Unregister subdev nodes
1999 * @camss: CAMSS device
2003 static void camss_unregister_entities(struct camss *camss) in camss_unregister_entities() argument
2007 for (i = 0; i < camss->res->csiphy_num; i++) in camss_unregister_entities()
2008 msm_csiphy_unregister_entity(&camss->csiphy[i]); in camss_unregister_entities()
2010 for (i = 0; i < camss->res->csid_num; i++) in camss_unregister_entities()
2011 msm_csid_unregister_entity(&camss->csid[i]); in camss_unregister_entities()
2013 msm_ispif_unregister_entities(camss->ispif); in camss_unregister_entities()
2015 for (i = 0; i < camss->res->vfe_num; i++) in camss_unregister_entities()
2016 msm_vfe_unregister_entities(&camss->vfe[i]); in camss_unregister_entities()
2023 struct camss *camss = container_of(async, struct camss, notifier); in camss_subdev_notifier_bound() local
2026 u8 id = csd->interface.csiphy_id; in camss_subdev_notifier_bound()
2027 struct csiphy_device *csiphy = &camss->csiphy[id]; in camss_subdev_notifier_bound()
2029 csiphy->cfg.csi2 = &csd->interface.csi2; in camss_subdev_notifier_bound()
2030 subdev->host_priv = csiphy; in camss_subdev_notifier_bound()
2037 struct camss *camss = container_of(async, struct camss, notifier); in camss_subdev_notifier_complete() local
2038 struct v4l2_device *v4l2_dev = &camss->v4l2_dev; in camss_subdev_notifier_complete()
2042 list_for_each_entry(sd, &v4l2_dev->subdevs, list) { in camss_subdev_notifier_complete()
2043 if (sd->host_priv) { in camss_subdev_notifier_complete()
2044 struct media_entity *sensor = &sd->entity; in camss_subdev_notifier_complete()
2046 (struct csiphy_device *) sd->host_priv; in camss_subdev_notifier_complete()
2047 struct media_entity *input = &csiphy->subdev.entity; in camss_subdev_notifier_complete()
2050 for (i = 0; i < sensor->num_pads; i++) { in camss_subdev_notifier_complete()
2051 if (sensor->pads[i].flags & MEDIA_PAD_FL_SOURCE) in camss_subdev_notifier_complete()
2054 if (i == sensor->num_pads) { in camss_subdev_notifier_complete()
2055 dev_err(camss->dev, in camss_subdev_notifier_complete()
2057 return -EINVAL; in camss_subdev_notifier_complete()
2064 dev_err(camss->dev, in camss_subdev_notifier_complete()
2065 "Failed to link %s->%s entities: %d\n", in camss_subdev_notifier_complete()
2066 sensor->name, input->name, ret); in camss_subdev_notifier_complete()
2072 ret = v4l2_device_register_subdev_nodes(&camss->v4l2_dev); in camss_subdev_notifier_complete()
2076 return media_device_register(&camss->media_dev); in camss_subdev_notifier_complete()
2088 static int camss_configure_pd(struct camss *camss) in camss_configure_pd() argument
2090 const struct camss_resources *res = camss->res; in camss_configure_pd()
2091 struct device *dev = camss->dev; in camss_configure_pd()
2096 camss->genpd_num = of_count_phandle_with_args(dev->of_node, in camss_configure_pd()
2097 "power-domains", in camss_configure_pd()
2098 "#power-domain-cells"); in camss_configure_pd()
2099 if (camss->genpd_num < 0) { in camss_configure_pd()
2100 dev_err(dev, "Power domains are not defined for camss\n"); in camss_configure_pd()
2101 return camss->genpd_num; in camss_configure_pd()
2107 * option to attach it again, this is the case for CAMSS on MSM8916. in camss_configure_pd()
2109 if (camss->genpd_num == 1) in camss_configure_pd()
2112 /* count the # of VFEs which have flagged power-domain */ in camss_configure_pd()
2113 for (vfepd_num = i = 0; i < camss->res->vfe_num; i++) { in camss_configure_pd()
2114 if (res->vfe_res[i].vfe.has_pd) in camss_configure_pd()
2119 * If the number of power-domains is greater than the number of VFEs in camss_configure_pd()
2120 * then the additional power-domain is for the entire CAMSS block. in camss_configure_pd()
2122 if (!(camss->genpd_num > vfepd_num)) in camss_configure_pd()
2126 * If a power-domain name is defined try to use it. in camss_configure_pd()
2130 if (camss->res->pd_name) { in camss_configure_pd()
2131 camss->genpd = dev_pm_domain_attach_by_name(camss->dev, in camss_configure_pd()
2132 camss->res->pd_name); in camss_configure_pd()
2133 if (IS_ERR(camss->genpd)) { in camss_configure_pd()
2134 ret = PTR_ERR(camss->genpd); in camss_configure_pd()
2139 if (!camss->genpd) { in camss_configure_pd()
2142 * item in the power-domain list. in camss_configure_pd()
2144 camss->genpd = dev_pm_domain_attach_by_id(camss->dev, in camss_configure_pd()
2145 camss->genpd_num - 1); in camss_configure_pd()
2147 if (IS_ERR_OR_NULL(camss->genpd)) { in camss_configure_pd()
2148 if (!camss->genpd) in camss_configure_pd()
2149 ret = -ENODEV; in camss_configure_pd()
2151 ret = PTR_ERR(camss->genpd); in camss_configure_pd()
2154 camss->genpd_link = device_link_add(camss->dev, camss->genpd, in camss_configure_pd()
2157 if (!camss->genpd_link) { in camss_configure_pd()
2158 ret = -EINVAL; in camss_configure_pd()
2165 dev_pm_domain_detach(camss->genpd, true); in camss_configure_pd()
2170 static int camss_icc_get(struct camss *camss) in camss_icc_get() argument
2175 icc_res = camss->res->icc_res; in camss_icc_get()
2177 for (i = 0; i < camss->res->icc_path_num; i++) { in camss_icc_get()
2178 camss->icc_path[i] = devm_of_icc_get(camss->dev, in camss_icc_get()
2180 if (IS_ERR(camss->icc_path[i])) in camss_icc_get()
2181 return PTR_ERR(camss->icc_path[i]); in camss_icc_get()
2187 static void camss_genpd_subdevice_cleanup(struct camss *camss) in camss_genpd_subdevice_cleanup() argument
2191 for (i = 0; i < camss->res->vfe_num; i++) in camss_genpd_subdevice_cleanup()
2192 msm_vfe_genpd_cleanup(&camss->vfe[i]); in camss_genpd_subdevice_cleanup()
2195 static void camss_genpd_cleanup(struct camss *camss) in camss_genpd_cleanup() argument
2197 if (camss->genpd_num == 1) in camss_genpd_cleanup()
2200 camss_genpd_subdevice_cleanup(camss); in camss_genpd_cleanup()
2202 if (camss->genpd_link) in camss_genpd_cleanup()
2203 device_link_del(camss->genpd_link); in camss_genpd_cleanup()
2205 dev_pm_domain_detach(camss->genpd, true); in camss_genpd_cleanup()
2209 * camss_probe - Probe CAMSS platform device
2210 * @pdev: Pointer to CAMSS platform device
2216 struct device *dev = &pdev->dev; in camss_probe()
2217 struct camss *camss; in camss_probe() local
2221 camss = devm_kzalloc(dev, sizeof(*camss), GFP_KERNEL); in camss_probe()
2222 if (!camss) in camss_probe()
2223 return -ENOMEM; in camss_probe()
2225 camss->res = of_device_get_match_data(dev); in camss_probe()
2227 atomic_set(&camss->ref_count, 0); in camss_probe()
2228 camss->dev = dev; in camss_probe()
2229 platform_set_drvdata(pdev, camss); in camss_probe()
2231 camss->csiphy = devm_kcalloc(dev, camss->res->csiphy_num, in camss_probe()
2232 sizeof(*camss->csiphy), GFP_KERNEL); in camss_probe()
2233 if (!camss->csiphy) in camss_probe()
2234 return -ENOMEM; in camss_probe()
2236 camss->csid = devm_kcalloc(dev, camss->res->csid_num, sizeof(*camss->csid), in camss_probe()
2238 if (!camss->csid) in camss_probe()
2239 return -ENOMEM; in camss_probe()
2241 if (camss->res->version == CAMSS_8x16 || in camss_probe()
2242 camss->res->version == CAMSS_8x96) { in camss_probe()
2243 camss->ispif = devm_kcalloc(dev, 1, sizeof(*camss->ispif), GFP_KERNEL); in camss_probe()
2244 if (!camss->ispif) in camss_probe()
2245 return -ENOMEM; in camss_probe()
2248 camss->vfe = devm_kcalloc(dev, camss->res->vfe_num, in camss_probe()
2249 sizeof(*camss->vfe), GFP_KERNEL); in camss_probe()
2250 if (!camss->vfe) in camss_probe()
2251 return -ENOMEM; in camss_probe()
2253 ret = camss_icc_get(camss); in camss_probe()
2257 ret = camss_configure_pd(camss); in camss_probe()
2263 ret = camss_init_subdevices(camss); in camss_probe()
2271 camss->media_dev.dev = camss->dev; in camss_probe()
2272 strscpy(camss->media_dev.model, "Qualcomm Camera Subsystem", in camss_probe()
2273 sizeof(camss->media_dev.model)); in camss_probe()
2274 camss->media_dev.ops = &camss_media_ops; in camss_probe()
2275 media_device_init(&camss->media_dev); in camss_probe()
2277 camss->v4l2_dev.mdev = &camss->media_dev; in camss_probe()
2278 ret = v4l2_device_register(camss->dev, &camss->v4l2_dev); in camss_probe()
2284 v4l2_async_nf_init(&camss->notifier, &camss->v4l2_dev); in camss_probe()
2288 num_subdevs = camss_of_parse_ports(camss); in camss_probe()
2294 ret = camss_register_entities(camss); in camss_probe()
2298 ret = camss->res->link_entities(camss); in camss_probe()
2303 camss->notifier.ops = &camss_subdev_notifier_ops; in camss_probe()
2305 ret = v4l2_async_nf_register(&camss->notifier); in camss_probe()
2313 ret = v4l2_device_register_subdev_nodes(&camss->v4l2_dev); in camss_probe()
2320 ret = media_device_register(&camss->media_dev); in camss_probe()
2331 camss_unregister_entities(camss); in camss_probe()
2333 v4l2_device_unregister(&camss->v4l2_dev); in camss_probe()
2334 v4l2_async_nf_cleanup(&camss->notifier); in camss_probe()
2337 camss_genpd_cleanup(camss); in camss_probe()
2342 void camss_delete(struct camss *camss) in camss_delete() argument
2344 v4l2_device_unregister(&camss->v4l2_dev); in camss_delete()
2345 media_device_unregister(&camss->media_dev); in camss_delete()
2346 media_device_cleanup(&camss->media_dev); in camss_delete()
2348 pm_runtime_disable(camss->dev); in camss_delete()
2352 * camss_remove - Remove CAMSS platform device
2353 * @pdev: Pointer to CAMSS platform device
2359 struct camss *camss = platform_get_drvdata(pdev); in camss_remove() local
2361 v4l2_async_nf_unregister(&camss->notifier); in camss_remove()
2362 v4l2_async_nf_cleanup(&camss->notifier); in camss_remove()
2363 camss_unregister_entities(camss); in camss_remove()
2365 if (atomic_read(&camss->ref_count) == 0) in camss_remove()
2366 camss_delete(camss); in camss_remove()
2368 camss_genpd_cleanup(camss); in camss_remove()
2448 { .compatible = "qcom,msm8916-camss", .data = &msm8916_resources },
2449 { .compatible = "qcom,msm8996-camss", .data = &msm8996_resources },
2450 { .compatible = "qcom,sdm660-camss", .data = &sdm660_resources },
2451 { .compatible = "qcom,sdm845-camss", .data = &sdm845_resources },
2452 { .compatible = "qcom,sm8250-camss", .data = &sm8250_resources },
2453 { .compatible = "qcom,sc8280xp-camss", .data = &sc8280xp_resources },
2461 struct camss *camss = dev_get_drvdata(dev); in camss_runtime_suspend() local
2465 for (i = 0; i < camss->res->icc_path_num; i++) { in camss_runtime_suspend()
2466 ret = icc_set_bw(camss->icc_path[i], 0, 0); in camss_runtime_suspend()
2476 struct camss *camss = dev_get_drvdata(dev); in camss_runtime_resume() local
2477 const struct resources_icc *icc_res = camss->res->icc_res; in camss_runtime_resume()
2481 for (i = 0; i < camss->res->icc_path_num; i++) { in camss_runtime_resume()
2482 ret = icc_set_bw(camss->icc_path[i], in camss_runtime_resume()
2502 .name = "qcom-camss",
2510 MODULE_ALIAS("platform:qcom-camss");