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

Configure Feed

Select the types of activity you want to include in your feed.

media: ccs: Make supported mbus code bitmask a u64

Prepare for adding more media bus codes.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Sakari Ailus and committed by
Hans Verkuil
0b216f7f 026d02ea

+7 -6
+5 -4
drivers/media/i2c/ccs/ccs-core.c
··· 13 13 * Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com> 14 14 */ 15 15 16 + #include <linux/bits.h> 16 17 #include <linux/clk.h> 17 18 #include <linux/delay.h> 18 19 #include <linux/device.h> ··· 1210 1209 1211 1210 dev_dbg(&client->dev, "jolly good! %u\n", j); 1212 1211 1213 - sensor->default_mbus_frame_fmts |= 1 << j; 1212 + sensor->default_mbus_frame_fmts |= BIT_U64(j); 1214 1213 } 1215 1214 } 1216 1215 ··· 1243 1242 f->compressed - sensor->compressed_min_bpp]; 1244 1243 unsigned int j; 1245 1244 1246 - if (!(sensor->default_mbus_frame_fmts & 1 << i)) 1245 + if (!(sensor->default_mbus_frame_fmts & BIT_U64(i))) 1247 1246 continue; 1248 1247 1249 1248 pll->bits_per_pixel = f->compressed; ··· 2091 2090 unsigned int i; 2092 2091 2093 2092 for (i = 0; i < ARRAY_SIZE(ccs_csi_data_formats); i++) { 2094 - if (sensor->mbus_frame_fmts & (1 << i) && 2093 + if (sensor->mbus_frame_fmts & BIT_U64(i) && 2095 2094 ccs_csi_data_formats[i].code == code) 2096 2095 return &ccs_csi_data_formats[i]; 2097 2096 } ··· 2121 2120 } 2122 2121 2123 2122 for (i = 0; i < ARRAY_SIZE(ccs_csi_data_formats); i++) { 2124 - if (sensor->mbus_frame_fmts & (1 << i)) 2123 + if (sensor->mbus_frame_fmts & BIT_U64(i)) 2125 2124 idx++; 2126 2125 2127 2126 if (idx == code->index) {
+2 -2
drivers/media/i2c/ccs/ccs.h
··· 222 222 void *ccs_limits; 223 223 u8 nbinning_subtypes; 224 224 struct ccs_binning_subtype binning_subtypes[CCS_LIM_BINNING_SUB_TYPE_MAX_N + 1]; 225 - u32 mbus_frame_fmts; 225 + u64 mbus_frame_fmts; 226 226 const struct ccs_csi_data_format *csi_format; 227 227 const struct ccs_csi_data_format *internal_csi_format; 228 - u32 default_mbus_frame_fmts; 228 + u64 default_mbus_frame_fmts; 229 229 int default_pixel_order; 230 230 struct ccs_data_container sdata, mdata; 231 231