Rev 6082 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6082 | Rev 6936 | ||
---|---|---|---|
Line 161... | Line 161... | ||
161 | static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev) |
161 | static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev) |
162 | { |
162 | { |
163 | return container_of(dev, struct mipi_dsi_device, dev); |
163 | return container_of(dev, struct mipi_dsi_device, dev); |
164 | } |
164 | } |
Line -... | Line 165... | ||
- | 165 | ||
- | 166 | /** |
|
- | 167 | * mipi_dsi_pixel_format_to_bpp - obtain the number of bits per pixel for any |
|
- | 168 | * given pixel format defined by the MIPI DSI |
|
- | 169 | * specification |
|
- | 170 | * @fmt: MIPI DSI pixel format |
|
- | 171 | * |
|
- | 172 | * Returns: The number of bits per pixel of the given pixel format. |
|
- | 173 | */ |
|
- | 174 | static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt) |
|
- | 175 | { |
|
- | 176 | switch (fmt) { |
|
- | 177 | case MIPI_DSI_FMT_RGB888: |
|
- | 178 | case MIPI_DSI_FMT_RGB666: |
|
- | 179 | return 24; |
|
- | 180 | ||
- | 181 | case MIPI_DSI_FMT_RGB666_PACKED: |
|
- | 182 | return 18; |
|
- | 183 | ||
- | 184 | case MIPI_DSI_FMT_RGB565: |
|
- | 185 | return 16; |
|
- | 186 | } |
|
- | 187 | ||
- | 188 | return -EINVAL; |
|
- | 189 | } |
|
165 | 190 | ||
166 | struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); |
191 | struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); |
167 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); |
192 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); |
- | 193 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); |
|
- | 194 | int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi); |
|
168 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); |
195 | int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi); |
169 | int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, |
196 | int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, |
Line 170... | Line 197... | ||
170 | u16 value); |
197 | u16 value); |
171 | 198 |