Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] atmel-isi: remove mck backward compatibility code

The master clock should be handled by sensor itself.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Josh Wu and committed by
Mauro Carvalho Chehab
4a99362d f3745a3a

-46
-46
drivers/media/platform/soc_camera/atmel-isi.c
··· 35 35 #define VID_LIMIT_BYTES (16 * 1024 * 1024) 36 36 #define MIN_FRAME_RATE 15 37 37 #define FRAME_INTERVAL_MILLI_SEC (1000 / MIN_FRAME_RATE) 38 - #define ISI_DEFAULT_MCLK_FREQ 25000000 39 38 40 39 /* Frame buffer descriptor */ 41 40 struct fbd { ··· 82 83 struct completion complete; 83 84 /* ISI peripherial clock */ 84 85 struct clk *pclk; 85 - /* ISI_MCK, feed to camera sensor to generate pixel clock */ 86 - struct clk *mck; 87 86 unsigned int irq; 88 87 89 88 struct isi_platform_data pdata; ··· 737 740 icd->devnum); 738 741 } 739 742 740 - /* Called with .host_lock held */ 741 - static int isi_camera_clock_start(struct soc_camera_host *ici) 742 - { 743 - struct atmel_isi *isi = ici->priv; 744 - int ret; 745 - 746 - if (!IS_ERR(isi->mck)) { 747 - ret = clk_prepare_enable(isi->mck); 748 - if (ret) { 749 - return ret; 750 - } 751 - } 752 - 753 - return 0; 754 - } 755 - 756 - /* Called with .host_lock held */ 757 - static void isi_camera_clock_stop(struct soc_camera_host *ici) 758 - { 759 - struct atmel_isi *isi = ici->priv; 760 - 761 - if (!IS_ERR(isi->mck)) 762 - clk_disable_unprepare(isi->mck); 763 - } 764 - 765 743 static unsigned int isi_camera_poll(struct file *file, poll_table *pt) 766 744 { 767 745 struct soc_camera_device *icd = file->private_data; ··· 846 874 .owner = THIS_MODULE, 847 875 .add = isi_camera_add_device, 848 876 .remove = isi_camera_remove_device, 849 - .clock_start = isi_camera_clock_start, 850 - .clock_stop = isi_camera_clock_stop, 851 877 .set_fmt = isi_camera_set_fmt, 852 878 .try_fmt = isi_camera_try_fmt, 853 879 .get_formats = isi_camera_get_formats, ··· 882 912 883 913 /* Default settings for ISI */ 884 914 isi->pdata.full_mode = 1; 885 - isi->pdata.mck_hz = ISI_DEFAULT_MCLK_FREQ; 886 915 isi->pdata.frate = ISI_CFG1_FRATE_CAPTURE_ALL; 887 916 888 917 np = of_graph_get_next_endpoint(np, NULL); ··· 956 987 spin_lock_init(&isi->lock); 957 988 INIT_LIST_HEAD(&isi->video_buffer_list); 958 989 INIT_LIST_HEAD(&isi->dma_desc_head); 959 - 960 - /* ISI_MCK is the sensor master clock. It should be handled by the 961 - * sensor driver directly, as the ISI has no use for that clock. Make 962 - * the clock optional here while platforms transition to the correct 963 - * model. 964 - */ 965 - isi->mck = devm_clk_get(dev, "isi_mck"); 966 - if (!IS_ERR(isi->mck)) { 967 - /* Set ISI_MCK's frequency, it should be faster than pixel 968 - * clock. 969 - */ 970 - ret = clk_set_rate(isi->mck, isi->pdata.mck_hz); 971 - if (ret < 0) 972 - return ret; 973 - } 974 990 975 991 isi->p_fb_descriptors = dma_alloc_coherent(&pdev->dev, 976 992 sizeof(struct fbd) * MAX_BUFFER_NUM,