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

drm/doc: add new dp helpers into drm DocBook

I didn't bother with documenting the really trivial new "extract
something from dpcd" helpers, but the i2c over aux ch is now
documented a bit.

v2: Clarify the comment for i2c_dp_aux_add_bus a bit.

v3: Fix more spelling fail spotted by Laurent Pinchart.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Daniel Vetter and committed by
Dave Airlie
28164fda d0ddc033

+35
+6
Documentation/DocBook/drm.tmpl
··· 2105 2105 !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers 2106 2106 !Edrivers/gpu/drm/drm_fb_helper.c 2107 2107 </sect2> 2108 + <sect2> 2109 + <title>Display Port Helper Functions Reference</title> 2110 + !Pdrivers/gpu/drm/drm_dp_helper.c dp helpers 2111 + !Iinclude/drm/drm_dp_helper.h 2112 + !Edrivers/gpu/drm/drm_dp_helper.c 2113 + </sect2> 2108 2114 </sect1> 2109 2115 2110 2116 <!-- Internals: vertical blanking -->
+21
drivers/gpu/drm/drm_dp_helper.c
··· 30 30 #include <drm/drm_dp_helper.h> 31 31 #include <drm/drmP.h> 32 32 33 + /** 34 + * DOC: dp helpers 35 + * 36 + * These functions contain some common logic and helpers at various abstraction 37 + * levels to deal with Display Port sink devices and related things like DP aux 38 + * channel transfers, EDID reading over DP aux channels, decoding certain DPCD 39 + * blocks, ... 40 + */ 41 + 33 42 /* Run a single AUX_CH I2C transaction, writing/reading data as necessary */ 34 43 static int 35 44 i2c_algo_dp_aux_transaction(struct i2c_adapter *adapter, int mode, ··· 202 193 return 0; 203 194 } 204 195 196 + /** 197 + * i2c_dp_aux_add_bus() - register an i2c adapter using the aux ch helper 198 + * @adapter: i2c adapter to register 199 + * 200 + * This registers an i2c adapater that uses dp aux channel as it's underlaying 201 + * transport. The driver needs to fill out the &i2c_algo_dp_aux_data structure 202 + * and store it in the algo_data member of the @adapter argument. This will be 203 + * used by the i2c over dp aux algorithm to drive the hardware. 204 + * 205 + * RETURNS: 206 + * 0 on success, -ERRNO on failure. 207 + */ 205 208 int 206 209 i2c_dp_aux_add_bus(struct i2c_adapter *adapter) 207 210 {
+8
include/drm/drm_dp_helper.h
··· 312 312 #define MODE_I2C_READ 4 313 313 #define MODE_I2C_STOP 8 314 314 315 + /** 316 + * struct i2c_algo_dp_aux_data - driver interface structure for i2c over dp 317 + * aux algorithm 318 + * @running: set by the algo indicating whether an i2c is ongoing or whether 319 + * the i2c bus is quiescent 320 + * @address: i2c target address for the currently ongoing transfer 321 + * @aux_ch: driver callback to transfer a single byte of the i2c payload 322 + */ 315 323 struct i2c_algo_dp_aux_data { 316 324 bool running; 317 325 u16 address;