Documentation/driver-api/reset.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

Reset controller API

Reset consumer의 shared·exclusive·optional·array handle semantics와 reset controller provider 등록 API를 다루는 전문 번역입니다.

Source pathDocumentation/driver-api/reset.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

reset.rst:1-221

Reset controller core는 consumer의 symbolic reset input을 provider가 등록한 control에 연결합니다. Shared reset은 deassert reference count와 trigger·rearm 균형을 따르고, exclusive reset은 즉시 직접 제어합니다. Optional과 array handle의 예외 semantics, provider의 `reset_control_ops`·`reset_controller_dev` 등록 경계까지 함께 설명합니다.

문서 구성
원문 줄내용
1-53API 구성과 reset subsystem 용어
54-105Consumer 획득과 shared·exclusive assertion
106-154Pulse, status, optional, array semantics
155-177Controller driver interface와 API 구분
178-221Consumer·controller kernel-doc reference

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 ====================
4 Reset controller API
5 ====================
6
7 Introduction
8 ============
9
10 Reset controllers are central units that control the reset signals to multiple
11 peripherals.
12 The reset controller API is split into two parts:
13 the `consumer driver interface <#consumer-driver-interface>`__ (`API reference
14 <#reset-consumer-api>`__), which allows peripheral drivers to request control
15 over their reset input signals, and the `reset controller driver interface
16 <#reset-controller-driver-interface>`__ (`API reference
17 <#reset-controller-driver-api>`__), which is used by drivers for reset
18 controller devices to register their reset controls to provide them to the
19 consumers.
20
21 While some reset controller hardware units also implement system restart
22 functionality, restart handlers are out of scope for the reset controller API.
23
24 Glossary
25 --------
26
27 The reset controller API uses these terms with a specific meaning:
28
29 Reset line
30
31 Physical reset line carrying a reset signal from a reset controller
32 hardware unit to a peripheral module.
33
34 Reset control
35
36 Control method that determines the state of one or multiple reset lines.
37 Most commonly this is a single bit in reset controller register space that
38 either allows direct control over the physical state of the reset line, or
39 is self-clearing and can be used to trigger a predetermined pulse on the
40 reset line.
41 In more complicated reset controls, a single trigger action can launch a
42 carefully timed sequence of pulses on multiple reset lines.
43
44 Reset controller
45
46 A hardware module that provides a number of reset controls to control a
47 number of reset lines.
48
49 Reset consumer
50
51 Peripheral module or external IC that is put into reset by the signal on a
52 reset line.
53
54 Consumer driver interface
55 =========================
56
57 This interface provides an API that is similar to the kernel clock framework.
58 Consumer drivers use get and put operations to acquire and release reset
59 controls.
60 Functions are provided to assert and deassert the controlled reset lines,
61 trigger reset pulses, or to query reset line status.
62
63 When requesting reset controls, consumers can use symbolic names for their
64 reset inputs, which are mapped to an actual reset control on an existing reset
65 controller device by the core.
66
67 A stub version of this API is provided when the reset controller framework is
68 not in use in order to minimize the need to use ifdefs.
69
70 Shared and exclusive resets
71 ---------------------------
72
73 The reset controller API provides either reference counted deassertion and
74 assertion or direct, exclusive control.
75 The distinction between shared and exclusive reset controls is made at the time
76 the reset control is requested, either via devm_reset_control_get_shared() or
77 via devm_reset_control_get_exclusive().
78 This choice determines the behavior of the API calls made with the reset
79 control.
80
81 Shared resets behave similarly to clocks in the kernel clock framework.
82 They provide reference counted deassertion, where only the first deassert,
83 which increments the deassertion reference count to one, and the last assert
84 which decrements the deassertion reference count back to zero, have a physical
85 effect on the reset line.
86
87 Exclusive resets on the other hand guarantee direct control.
88 That is, an assert causes the reset line to be asserted immediately, and a
89 deassert causes the reset line to be deasserted immediately.
90
91 Assertion and deassertion
92 -------------------------
93
94 Consumer drivers use the reset_control_assert() and reset_control_deassert()
95 functions to assert and deassert reset lines.
96 For shared reset controls, calls to the two functions must be balanced.
97
98 Note that since multiple consumers may be using a shared reset control, there
99 is no guarantee that calling reset_control_assert() on a shared reset control
100 will actually cause the reset line to be asserted.
101 Consumer drivers using shared reset controls should assume that the reset line
102 may be kept deasserted at all times.
103 The API only guarantees that the reset line can not be asserted as long as any
104 consumer has requested it to be deasserted.
105
106 Triggering
107 ----------
108
109 Consumer drivers use reset_control_reset() to trigger a reset pulse on a
110 self-deasserting reset control.
111 In general, these resets can not be shared between multiple consumers, since
112 requesting a pulse from any consumer driver will reset all connected
113 peripherals.
114
115 The reset controller API allows requesting self-deasserting reset controls as
116 shared, but for those only the first trigger request causes an actual pulse to
117 be issued on the reset line.
118 All further calls to this function have no effect until all consumers have
119 called reset_control_rearm().
120 For shared reset controls, calls to the two functions must be balanced.
121 This allows devices that only require an initial reset at any point before the
122 driver is probed or resumed to share a pulsed reset line.
123
124 Querying
125 --------
126
127 Only some reset controllers support querying the current status of a reset
128 line, via reset_control_status().
129 If supported, this function returns a positive non-zero value if the given
130 reset line is asserted.
131 The reset_control_status() function does not accept a
132 `reset control array <#reset-control-arrays>`__ handle as its input parameter.
133
134 Optional resets
135 ---------------
136
137 Often peripherals require a reset line on some platforms but not on others.
138 For this, reset controls can be requested as optional using
139 devm_reset_control_get_optional_exclusive() or
140 devm_reset_control_get_optional_shared().
141 These functions return a NULL pointer instead of an error when the requested
142 reset control is not specified in the device tree.
143 Passing a NULL pointer to the reset_control functions causes them to return
144 quietly without an error.
145
146 Reset control arrays
147 --------------------
148
149 Some drivers need to assert a bunch of reset lines in no particular order.
150 devm_reset_control_array_get() returns an opaque reset control handle that can
151 be used to assert, deassert, or trigger all specified reset controls at once.
152 The reset control API does not guarantee the order in which the individual
153 controls therein are handled.
154
155 Reset controller driver interface
156 =================================
157
158 Drivers for reset controller modules provide the functionality necessary to
159 assert or deassert reset signals, to trigger a reset pulse on a reset line, or
160 to query its current state.
161 All functions are optional.
162
163 Initialization
164 --------------
165
166 Drivers fill a struct :c:type:`reset_controller_dev` and register it with
167 reset_controller_register() in their probe function.
168 The actual functionality is implemented in callback functions via a struct
169 :c:type:`reset_control_ops`.
170
171 API reference
172 =============
173
174 The reset controller API is documented here in two parts:
175 the `reset consumer API <#reset-consumer-api>`__ and the `reset controller
176 driver API <#reset-controller-driver-api>`__.
177
178 Reset consumer API
179 ------------------
180
181 Reset consumers can control a reset line using an opaque reset control handle,
182 which can be obtained from devm_reset_control_get_exclusive() or
183 devm_reset_control_get_shared().
184 Given the reset control, consumers can call reset_control_assert() and
185 reset_control_deassert(), trigger a reset pulse using reset_control_reset(), or
186 query the reset line status using reset_control_status().
187
188 .. kernel-doc:: include/linux/reset.h
189 :internal:
190
191 .. kernel-doc:: drivers/reset/core.c
192 :functions: reset_control_reset
193 reset_control_assert
194 reset_control_deassert
195 reset_control_status
196 reset_control_acquire
197 reset_control_release
198 reset_control_rearm
199 reset_control_put
200 of_reset_control_get_count
201 of_reset_control_array_get
202 devm_reset_control_array_get
203 reset_control_get_count
204
205 Reset controller driver API
206 ---------------------------
207
208 Reset controller drivers are supposed to implement the necessary functions in
209 a static constant structure :c:type:`reset_control_ops`, allocate and fill out
210 a struct :c:type:`reset_controller_dev`, and register it using
211 devm_reset_controller_register().
212
213 .. kernel-doc:: include/linux/reset-controller.h
214 :internal:
215
216 .. kernel-doc:: drivers/reset/core.c
217 :functions: of_reset_simple_xlate
218 reset_controller_register
219 reset_controller_unregister
220 devm_reset_controller_register
221 reset_controller_add_lookup
222

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Reset controller API 문서 정보

1-6

이 문서는 `GPL-2.0-only` 라이선스를 따르며 Linux reset controller API를 설명합니다.

문서 식별 정보
항목
문서Reset controller API
SPDX`GPL-2.0-only`
범위Consumer와 reset controller driver interface

.. SPDX-License-Identifier: GPL-2.0-only

====================
Reset controller API
====================

Consumer와 controller interface

7-23

Reset controller는 여러 peripheral로 전달되는 reset signal을 제어하는 중앙 장치입니다.

Reset controller API는 두 부분으로 나뉩니다. Consumer driver interface는 peripheral driver가 자신의 reset input signal 제어권을 요청하게 하고, reset controller driver interface는 controller device driver가 reset control을 등록해 consumer에 제공하게 합니다. 각 interface에는 별도의 API reference가 있습니다.

일부 reset controller hardware가 system restart 기능도 구현하지만 restart handler는 reset controller API의 범위에 포함되지 않습니다.

Reset controller API 구성
Reset controller driverRegister reset controlsReset controller coreConsumer driverPeripheral reset input
System restart handlerOut of scope

Core가 provider가 등록한 reset control을 consumer의 reset input 요청에 연결합니다.

Introduction
============

Reset controllers are central units that control the reset signals to multiple
peripherals.
The reset controller API is split into two parts:
the `consumer driver interface <#consumer-driver-interface>`__ (`API reference
<#reset-consumer-api>`__), which allows peripheral drivers to request control
over their reset input signals, and the `reset controller driver interface
<#reset-controller-driver-interface>`__ (`API reference
<#reset-controller-driver-api>`__), which is used by drivers for reset
controller devices to register their reset controls to provide them to the
consumers.

While some reset controller hardware units also implement system restart
functionality, restart handlers are out of scope for the reset controller API.

Reset subsystem 용어

24-53

Reset line은 reset controller hardware unit에서 peripheral module로 reset signal을 전달하는 물리 선입니다.

Reset control은 하나 이상의 reset line 상태를 결정하는 제어 방식입니다. 흔히 controller register space의 단일 bit이며, 물리 line 상태를 직접 제어하거나 self-clearing 동작으로 미리 정해진 pulse를 발생시킵니다. 더 복잡한 control은 한 번의 trigger로 여러 reset line에 정밀하게 timing된 pulse sequence를 시작할 수도 있습니다.

Reset controller는 여러 reset line을 제어할 수 있는 reset control 집합을 제공하는 hardware module입니다. Reset consumer는 reset line의 signal로 reset 상태에 들어가는 peripheral module 또는 external IC입니다.

Reset 용어
용어구체적 의미
Reset lineController에서 peripheral로 signal을 전달하는 물리 선
Reset control하나 이상의 line 상태 또는 pulse sequence를 결정하는 제어 방식
Reset controller여러 reset control을 제공하는 hardware module
Reset consumerReset signal을 받는 peripheral 또는 external IC

Glossary
--------

The reset controller API uses these terms with a specific meaning:

Reset line

    Physical reset line carrying a reset signal from a reset controller
    hardware unit to a peripheral module.

Reset control

    Control method that determines the state of one or multiple reset lines.
    Most commonly this is a single bit in reset controller register space that
    either allows direct control over the physical state of the reset line, or
    is self-clearing and can be used to trigger a predetermined pulse on the
    reset line.
    In more complicated reset controls, a single trigger action can launch a
    carefully timed sequence of pulses on multiple reset lines.

Reset controller

    A hardware module that provides a number of reset controls to control a
    number of reset lines.

Reset consumer

    Peripheral module or external IC that is put into reset by the signal on a
    reset line.

Consumer driver interface 개요

54-69

Consumer interface는 kernel clock framework와 비슷합니다. Consumer driver는 get과 put operation으로 reset control을 획득하고 반환합니다.

제공되는 function으로 제어 대상 reset line을 assert·deassert하거나 reset pulse를 trigger하고, reset line status를 조회할 수 있습니다.

Consumer는 reset input을 symbolic name으로 요청할 수 있습니다. Core가 이 이름을 기존 reset controller device의 실제 reset control에 mapping합니다.

Reset controller framework를 사용하지 않는 configuration에서도 ifdef 사용을 최소화할 수 있도록 이 API의 stub version을 제공합니다.

Consumer reset control 경로
Consumer symbolic namegetCore mappingReset control handleassert / deassert / reset / statusput
Framework disabledStub APIMinimal ifdefs

Symbolic reset input이 core mapping을 거쳐 실제 controller control에 연결됩니다.

Consumer driver interface
=========================

This interface provides an API that is similar to the kernel clock framework.
Consumer drivers use get and put operations to acquire and release reset
controls.
Functions are provided to assert and deassert the controlled reset lines,
trigger reset pulses, or to query reset line status.

When requesting reset controls, consumers can use symbolic names for their
reset inputs, which are mapped to an actual reset control on an existing reset
controller device by the core.

A stub version of this API is provided when the reset controller framework is
not in use in order to minimize the need to use ifdefs.

Shared와 exclusive reset

70-90

Reset controller API는 reference-counted deassertion·assertion 또는 직접적인 exclusive control을 제공합니다. Reset control을 요청할 때 `devm_reset_control_get_shared()`나 `devm_reset_control_get_exclusive()`를 선택하며, 이 선택이 이후 API call의 동작을 결정합니다.

Shared reset은 clock framework와 비슷합니다. Deassertion reference count가 0에서 1이 되는 첫 deassert와 1에서 0이 되는 마지막 assert만 reset line에 물리적 효과를 냅니다.

Exclusive reset은 직접 제어를 보장합니다. Assert call은 즉시 reset line을 assert하고 deassert call은 즉시 deassert합니다.

Shared와 exclusive 동작
구분요청 API물리 신호 효과
Shared`devm_reset_control_get_shared()`첫 deassert와 마지막 assert만 적용
Exclusive`devm_reset_control_get_exclusive()`각 assert·deassert를 즉시 적용

Handle 획득 시점의 선택은 해당 reset control에 대한 이후 API semantics를 고정합니다.

Shared and exclusive resets
---------------------------

The reset controller API provides either reference counted deassertion and
assertion or direct, exclusive control.
The distinction between shared and exclusive reset controls is made at the time
the reset control is requested, either via devm_reset_control_get_shared() or
via devm_reset_control_get_exclusive().
This choice determines the behavior of the API calls made with the reset
control.

Shared resets behave similarly to clocks in the kernel clock framework.
They provide reference counted deassertion, where only the first deassert,
which increments the deassertion reference count to one, and the last assert
which decrements the deassertion reference count back to zero, have a physical
effect on the reset line.

Exclusive resets on the other hand guarantee direct control.
That is, an assert causes the reset line to be asserted immediately, and a
deassert causes the reset line to be deasserted immediately.

Assertion과 deassertion

91-105

Consumer driver는 `reset_control_assert()`와 `reset_control_deassert()`로 reset line을 assert하거나 deassert합니다. Shared reset control에서는 두 function의 call 수가 균형을 이뤄야 합니다.

여러 consumer가 shared reset control을 사용할 수 있으므로 한 consumer가 `reset_control_assert()`를 호출해도 reset line이 실제로 assert된다는 보장은 없습니다. Shared consumer는 line이 계속 deassert 상태일 수 있다고 가정해야 합니다.

API가 보장하는 것은 어느 consumer든 deassert를 요청한 동안에는 reset line을 assert할 수 없다는 점입니다.

Shared assertion reference count
Count 0First `reset_control_deassert()`Count 1 and line deassertedAdditional deassert requestsCount N
Balanced `reset_control_assert()` callsCount returns to 0Line may be asserted

Shared reset은 모든 consumer의 deassert 요구가 해제된 뒤에만 line을 assert할 수 있습니다.

Assertion and deassertion
-------------------------

Consumer drivers use the reset_control_assert() and reset_control_deassert()
functions to assert and deassert reset lines.
For shared reset controls, calls to the two functions must be balanced.

Note that since multiple consumers may be using a shared reset control, there
is no guarantee that calling reset_control_assert() on a shared reset control
will actually cause the reset line to be asserted.
Consumer drivers using shared reset controls should assume that the reset line
may be kept deasserted at all times.
The API only guarantees that the reset line can not be asserted as long as any
consumer has requested it to be deasserted.

Self-deasserting reset pulse

106-123

Consumer driver는 `reset_control_reset()`으로 self-deasserting reset control의 reset pulse를 trigger합니다. 일반적으로 한 consumer의 pulse 요청이 연결된 모든 peripheral을 reset하므로 이런 reset은 여러 consumer가 공유할 수 없습니다.

API는 self-deasserting reset control을 shared로 요청하는 것도 허용합니다. 이 경우 첫 trigger 요청만 실제 pulse를 내보내며, 모든 consumer가 `reset_control_rearm()`을 호출할 때까지 이후 `reset_control_reset()` 호출은 효과가 없습니다.

Shared reset control에서는 trigger와 rearm 호출 수가 균형을 이뤄야 합니다. 이 semantics 덕분에 probe 또는 resume 전에 어느 시점에서든 한 번의 초기 reset만 필요로 하는 device들이 pulsed reset line을 공유할 수 있습니다.

Shared pulse와 rearm
Armed shared controlFirst `reset_control_reset()`Physical reset pulseFurther reset calls have no effectAll consumers call `reset_control_rearm()`Armed again

첫 trigger 뒤에는 모든 consumer가 rearm해야 다음 실제 pulse를 허용합니다.

Triggering
----------

Consumer drivers use reset_control_reset() to trigger a reset pulse on a
self-deasserting reset control.
In general, these resets can not be shared between multiple consumers, since
requesting a pulse from any consumer driver will reset all connected
peripherals.

The reset controller API allows requesting self-deasserting reset controls as
shared, but for those only the first trigger request causes an actual pulse to
be issued on the reset line.
All further calls to this function have no effect until all consumers have
called reset_control_rearm().
For shared reset controls, calls to the two functions must be balanced.
This allows devices that only require an initial reset at any point before the
driver is probed or resumed to share a pulsed reset line.

Reset line status 조회

124-133

현재 reset line 상태 조회는 일부 reset controller만 `reset_control_status()`를 통해 지원합니다. 지원되는 경우 주어진 line이 assert 상태이면 positive non-zero 값을 반환합니다.

`reset_control_status()`는 reset control array handle을 input parameter로 받지 않습니다.

Status query 제약
항목동작
API`reset_control_status()`
지원 범위Controller가 status query를 구현한 경우
Assert 상태Positive non-zero 반환
Reset control arrayInput handle로 허용하지 않음

Querying
--------

Only some reset controllers support querying the current status of a reset
line, via reset_control_status().
If supported, this function returns a positive non-zero value if the given
reset line is asserted.
The reset_control_status() function does not accept a
`reset control array <#reset-control-arrays>`__ handle as its input parameter.

Platform별 optional reset

134-145

Peripheral이 어떤 platform에서는 reset line을 필요로 하지만 다른 platform에서는 필요로 하지 않는 경우가 많습니다.

이때 `devm_reset_control_get_optional_exclusive()` 또는 `devm_reset_control_get_optional_shared()`로 optional reset control을 요청할 수 있습니다. Device tree에 요청한 reset control이 지정되지 않았으면 error 대신 `NULL` pointer를 반환합니다.

Reset control function에 `NULL` pointer를 전달하면 error 없이 조용히 반환하므로 동일한 consumer code를 reset line 유무와 관계없이 사용할 수 있습니다.

Optional reset 획득
Optional getReset specifiedReset control handleNormal operation
Optional getNot specified in device tree`NULL`Reset functions return quietly

Device tree에 reset 지정이 없어도 NULL-safe API가 consumer 경로를 유지합니다.

Optional resets
---------------

Often peripherals require a reset line on some platforms but not on others.
For this, reset controls can be requested as optional using
devm_reset_control_get_optional_exclusive() or
devm_reset_control_get_optional_shared().
These functions return a NULL pointer instead of an error when the requested
reset control is not specified in the device tree.
Passing a NULL pointer to the reset_control functions causes them to return
quietly without an error.

Reset control array

146-154

일부 driver는 특정 순서 없이 여러 reset line을 한꺼번에 assert해야 합니다. `devm_reset_control_array_get()`은 지정된 모든 reset control을 동시에 assert·deassert하거나 trigger하는 데 사용할 수 있는 opaque reset control handle을 반환합니다.

Reset control API는 array 안의 개별 control을 처리하는 순서를 보장하지 않습니다.

Reset control array semantics
항목내용
획득`devm_reset_control_array_get()`
Handle여러 control을 감싼 opaque reset control
Operation전체 assert·deassert·trigger
순서개별 control 처리 순서 비보장

Reset control arrays
--------------------

Some drivers need to assert a bunch of reset lines in no particular order.
devm_reset_control_array_get() returns an opaque reset control handle that can
be used to assert, deassert, or trigger all specified reset controls at once.
The reset control API does not guarantee the order in which the individual
controls therein are handled.

Reset controller driver interface

155-162

Reset controller module driver는 reset signal을 assert·deassert하고, reset line에 pulse를 trigger하거나 현재 상태를 조회하는 데 필요한 기능을 제공합니다.

이 interface의 모든 function은 optional입니다. Hardware가 지원하고 driver가 제공해야 하는 operation만 구현할 수 있습니다.

Provider operation
Reset controller driverassert / deassertpulse triggerstatus query
All callbacksOptional

Reset controller driver는 hardware가 제공하는 callback 조합을 선택해 구현합니다.

Reset controller driver interface
=================================

Drivers for reset controller modules provide the functionality necessary to
assert or deassert reset signals, to trigger a reset pulse on a reset line, or
to query its current state.
All functions are optional.

Controller 등록과 callback

163-170

Driver는 `struct reset_controller_dev`를 채우고 probe function에서 `reset_controller_register()`로 등록합니다.

실제 reset 기능은 `struct reset_control_ops`에 연결한 callback function으로 구현합니다.

Reset controller 초기화
Fill `struct reset_control_ops`Fill `struct reset_controller_dev`Probe`reset_controller_register()`Consumer-visible controls

Provider metadata와 operation callback을 준비한 뒤 core에 controller를 등록합니다.

Initialization
--------------

Drivers fill a struct :c:type:`reset_controller_dev` and register it with
reset_controller_register() in their probe function.
The actual functionality is implemented in callback functions via a struct
:c:type:`reset_control_ops`.

API reference 구성

171-177

Reset controller API reference는 reset consumer API와 reset controller driver API의 두 부분으로 문서화됩니다.

API reference 구분
구분대상
Reset consumer APIReset control을 사용하는 peripheral driver
Reset controller driver APIReset control을 제공하는 controller driver

API reference
=============

The reset controller API is documented here in two parts:
the `reset consumer API <#reset-consumer-api>`__ and the `reset controller
driver API <#reset-controller-driver-api>`__.

Reset consumer API reference

178-204

Reset consumer는 `devm_reset_control_get_exclusive()` 또는 `devm_reset_control_get_shared()`로 얻은 opaque reset control handle을 사용해 reset line을 제어합니다.

Handle로 `reset_control_assert()`와 `reset_control_deassert()`를 호출하고, `reset_control_reset()`으로 pulse를 trigger하거나 `reset_control_status()`로 line 상태를 조회할 수 있습니다.

Kernel-doc은 `include/linux/reset.h`의 internal declaration과 `drivers/reset/core.c`의 reset·assert·deassert·status·acquire·release·rearm·put 및 count·array 관련 function을 가져옵니다.

Consumer kernel-doc source
Source path포함 내용
`include/linux/reset.h``:internal:`
`drivers/reset/core.c``reset_control_reset()`부터 `reset_control_get_count()`까지 지정 function

Reset consumer API
------------------

Reset consumers can control a reset line using an opaque reset control handle,
which can be obtained from devm_reset_control_get_exclusive() or
devm_reset_control_get_shared().
Given the reset control, consumers can call reset_control_assert() and
reset_control_deassert(), trigger a reset pulse using reset_control_reset(), or
query the reset line status using reset_control_status().

.. kernel-doc:: include/linux/reset.h
   :internal:

.. kernel-doc:: drivers/reset/core.c
   :functions: reset_control_reset
               reset_control_assert
               reset_control_deassert
               reset_control_status
               reset_control_acquire
               reset_control_release
               reset_control_rearm
               reset_control_put
               of_reset_control_get_count
               of_reset_control_array_get
               devm_reset_control_array_get
               reset_control_get_count

Reset controller driver API reference

205-221

Reset controller driver는 필요한 function을 static constant `struct reset_control_ops`에 구현하고, `struct reset_controller_dev`를 allocate·작성한 뒤 `devm_reset_controller_register()`로 등록해야 합니다.

Kernel-doc은 `include/linux/reset-controller.h`의 internal declaration과 `drivers/reset/core.c`의 simple translation, register·unregister, devm registration, lookup 추가 function을 가져옵니다.

Controller driver kernel-doc source
Source path포함 내용
`include/linux/reset-controller.h``:internal:`
`drivers/reset/core.c``of_reset_simple_xlate()`, register·unregister, devm register, lookup

Reset controller driver API
---------------------------

Reset controller drivers are supposed to implement the necessary functions in
a static constant structure :c:type:`reset_control_ops`, allocate and fill out
a struct :c:type:`reset_controller_dev`, and register it using
devm_reset_controller_register().

.. kernel-doc:: include/linux/reset-controller.h
   :internal:

.. kernel-doc:: drivers/reset/core.c
   :functions: of_reset_simple_xlate
               reset_controller_register
               reset_controller_unregister
               devm_reset_controller_register
               reset_controller_add_lookup