regmap-debugfs.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. /*
  2. * Register map access API - debugfs
  3. *
  4. * Copyright 2011 Wolfson Microelectronics plc
  5. *
  6. * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/slab.h>
  13. #include <linux/mutex.h>
  14. #include <linux/debugfs.h>
  15. #include <linux/uaccess.h>
  16. #include <linux/device.h>
  17. #include <linux/list.h>
  18. #include "internal.h"
  19. struct regmap_debugfs_node {
  20. struct regmap *map;
  21. const char *name;
  22. struct list_head link;
  23. };
  24. static unsigned int dummy_index;
  25. static struct dentry *regmap_debugfs_root;
  26. static LIST_HEAD(regmap_debugfs_early_list);
  27. static DEFINE_MUTEX(regmap_debugfs_early_lock);
  28. /* Calculate the length of a fixed format */
  29. static size_t regmap_calc_reg_len(int max_val)
  30. {
  31. return snprintf(NULL, 0, "%x", max_val);
  32. }
  33. static ssize_t regmap_name_read_file(struct file *file,
  34. char __user *user_buf, size_t count,
  35. loff_t *ppos)
  36. {
  37. struct regmap *map = file->private_data;
  38. const char *name = "nodev";
  39. int ret;
  40. char *buf;
  41. buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
  42. if (!buf)
  43. return -ENOMEM;
  44. if (map->dev && map->dev->driver)
  45. name = map->dev->driver->name;
  46. ret = snprintf(buf, PAGE_SIZE, "%s\n", name);
  47. if (ret < 0) {
  48. kfree(buf);
  49. return ret;
  50. }
  51. ret = simple_read_from_buffer(user_buf, count, ppos, buf, ret);
  52. kfree(buf);
  53. return ret;
  54. }
  55. static const struct file_operations regmap_name_fops = {
  56. .open = simple_open,
  57. .read = regmap_name_read_file,
  58. .llseek = default_llseek,
  59. };
  60. static void regmap_debugfs_free_dump_cache(struct regmap *map)
  61. {
  62. struct regmap_debugfs_off_cache *c;
  63. while (!list_empty(&map->debugfs_off_cache)) {
  64. c = list_first_entry(&map->debugfs_off_cache,
  65. struct regmap_debugfs_off_cache,
  66. list);
  67. list_del(&c->list);
  68. kfree(c);
  69. }
  70. }
  71. static bool regmap_printable(struct regmap *map, unsigned int reg)
  72. {
  73. if (regmap_precious(map, reg))
  74. return false;
  75. if (!regmap_readable(map, reg) && !regmap_cached(map, reg))
  76. return false;
  77. return true;
  78. }
  79. /*
  80. * Work out where the start offset maps into register numbers, bearing
  81. * in mind that we suppress hidden registers.
  82. */
  83. static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
  84. unsigned int base,
  85. loff_t from,
  86. loff_t *pos)
  87. {
  88. struct regmap_debugfs_off_cache *c = NULL;
  89. loff_t p = 0;
  90. unsigned int i, ret;
  91. unsigned int fpos_offset;
  92. unsigned int reg_offset;
  93. /* Suppress the cache if we're using a subrange */
  94. if (base)
  95. return base;
  96. /*
  97. * If we don't have a cache build one so we don't have to do a
  98. * linear scan each time.
  99. */
  100. mutex_lock(&map->cache_lock);
  101. i = base;
  102. if (list_empty(&map->debugfs_off_cache)) {
  103. for (; i <= map->max_register; i += map->reg_stride) {
  104. /* Skip unprinted registers, closing off cache entry */
  105. if (!regmap_printable(map, i)) {
  106. if (c) {
  107. c->max = p - 1;
  108. c->max_reg = i - map->reg_stride;
  109. list_add_tail(&c->list,
  110. &map->debugfs_off_cache);
  111. c = NULL;
  112. }
  113. continue;
  114. }
  115. /* No cache entry? Start a new one */
  116. if (!c) {
  117. c = kzalloc(sizeof(*c), GFP_KERNEL);
  118. if (!c) {
  119. regmap_debugfs_free_dump_cache(map);
  120. mutex_unlock(&map->cache_lock);
  121. return base;
  122. }
  123. c->min = p;
  124. c->base_reg = i;
  125. }
  126. p += map->debugfs_tot_len;
  127. }
  128. }
  129. /* Close the last entry off if we didn't scan beyond it */
  130. if (c) {
  131. c->max = p - 1;
  132. c->max_reg = i - map->reg_stride;
  133. list_add_tail(&c->list,
  134. &map->debugfs_off_cache);
  135. }
  136. /*
  137. * This should never happen; we return above if we fail to
  138. * allocate and we should never be in this code if there are
  139. * no registers at all.
  140. */
  141. WARN_ON(list_empty(&map->debugfs_off_cache));
  142. ret = base;
  143. /* Find the relevant block:offset */
  144. list_for_each_entry(c, &map->debugfs_off_cache, list) {
  145. if (from >= c->min && from <= c->max) {
  146. fpos_offset = from - c->min;
  147. reg_offset = fpos_offset / map->debugfs_tot_len;
  148. *pos = c->min + (reg_offset * map->debugfs_tot_len);
  149. mutex_unlock(&map->cache_lock);
  150. return c->base_reg + (reg_offset * map->reg_stride);
  151. }
  152. *pos = c->max;
  153. ret = c->max_reg;
  154. }
  155. mutex_unlock(&map->cache_lock);
  156. return ret;
  157. }
  158. static inline void regmap_calc_tot_len(struct regmap *map,
  159. void *buf, size_t count)
  160. {
  161. /* Calculate the length of a fixed format */
  162. if (!map->debugfs_tot_len) {
  163. map->debugfs_reg_len = regmap_calc_reg_len(map->max_register),
  164. map->debugfs_val_len = 2 * map->format.val_bytes;
  165. map->debugfs_tot_len = map->debugfs_reg_len +
  166. map->debugfs_val_len + 3; /* : \n */
  167. }
  168. }
  169. static ssize_t regmap_read_debugfs(struct regmap *map, unsigned int from,
  170. unsigned int to, char __user *user_buf,
  171. size_t count, loff_t *ppos)
  172. {
  173. size_t buf_pos = 0;
  174. loff_t p = *ppos;
  175. ssize_t ret;
  176. int i;
  177. char *buf;
  178. unsigned int val, start_reg;
  179. if (*ppos < 0 || !count)
  180. return -EINVAL;
  181. if (count > (PAGE_SIZE << (MAX_ORDER - 1)))
  182. count = PAGE_SIZE << (MAX_ORDER - 1);
  183. buf = kmalloc(count, GFP_KERNEL);
  184. if (!buf)
  185. return -ENOMEM;
  186. regmap_calc_tot_len(map, buf, count);
  187. /* Work out which register we're starting at */
  188. start_reg = regmap_debugfs_get_dump_start(map, from, *ppos, &p);
  189. for (i = start_reg; i <= to; i += map->reg_stride) {
  190. if (!regmap_readable(map, i) && !regmap_cached(map, i))
  191. continue;
  192. if (regmap_precious(map, i))
  193. continue;
  194. /* If we're in the region the user is trying to read */
  195. if (p >= *ppos) {
  196. /* ...but not beyond it */
  197. if (buf_pos + map->debugfs_tot_len > count)
  198. break;
  199. /* Format the register */
  200. snprintf(buf + buf_pos, count - buf_pos, "%.*x: ",
  201. map->debugfs_reg_len, i - from);
  202. buf_pos += map->debugfs_reg_len + 2;
  203. /* Format the value, write all X if we can't read */
  204. ret = regmap_read(map, i, &val);
  205. if (ret == 0)
  206. snprintf(buf + buf_pos, count - buf_pos,
  207. "%.*x", map->debugfs_val_len, val);
  208. else
  209. memset(buf + buf_pos, 'X',
  210. map->debugfs_val_len);
  211. buf_pos += 2 * map->format.val_bytes;
  212. buf[buf_pos++] = '\n';
  213. }
  214. p += map->debugfs_tot_len;
  215. }
  216. ret = buf_pos;
  217. if (copy_to_user(user_buf, buf, buf_pos)) {
  218. ret = -EFAULT;
  219. goto out;
  220. }
  221. *ppos += buf_pos;
  222. out:
  223. kfree(buf);
  224. return ret;
  225. }
  226. static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
  227. size_t count, loff_t *ppos)
  228. {
  229. struct regmap *map = file->private_data;
  230. return regmap_read_debugfs(map, 0, map->max_register, user_buf,
  231. count, ppos);
  232. }
  233. #undef REGMAP_ALLOW_WRITE_DEBUGFS
  234. #ifdef REGMAP_ALLOW_WRITE_DEBUGFS
  235. /*
  236. * This can be dangerous especially when we have clients such as
  237. * PMICs, therefore don't provide any real compile time configuration option
  238. * for this feature, people who want to use this will need to modify
  239. * the source code directly.
  240. */
  241. static ssize_t regmap_map_write_file(struct file *file,
  242. const char __user *user_buf,
  243. size_t count, loff_t *ppos)
  244. {
  245. char buf[32];
  246. size_t buf_size;
  247. char *start = buf;
  248. unsigned long reg, value;
  249. struct regmap *map = file->private_data;
  250. int ret;
  251. buf_size = min(count, (sizeof(buf)-1));
  252. if (copy_from_user(buf, user_buf, buf_size))
  253. return -EFAULT;
  254. buf[buf_size] = 0;
  255. while (*start == ' ')
  256. start++;
  257. reg = simple_strtoul(start, &start, 16);
  258. while (*start == ' ')
  259. start++;
  260. if (kstrtoul(start, 16, &value))
  261. return -EINVAL;
  262. /* Userspace has been fiddling around behind the kernel's back */
  263. add_taint(TAINT_USER, LOCKDEP_STILL_OK);
  264. ret = regmap_write(map, reg, value);
  265. if (ret < 0)
  266. return ret;
  267. return buf_size;
  268. }
  269. #else
  270. #define regmap_map_write_file NULL
  271. #endif
  272. static const struct file_operations regmap_map_fops = {
  273. .open = simple_open,
  274. .read = regmap_map_read_file,
  275. .write = regmap_map_write_file,
  276. .llseek = default_llseek,
  277. };
  278. static ssize_t regmap_range_read_file(struct file *file, char __user *user_buf,
  279. size_t count, loff_t *ppos)
  280. {
  281. struct regmap_range_node *range = file->private_data;
  282. struct regmap *map = range->map;
  283. return regmap_read_debugfs(map, range->range_min, range->range_max,
  284. user_buf, count, ppos);
  285. }
  286. static const struct file_operations regmap_range_fops = {
  287. .open = simple_open,
  288. .read = regmap_range_read_file,
  289. .llseek = default_llseek,
  290. };
  291. static ssize_t regmap_reg_ranges_read_file(struct file *file,
  292. char __user *user_buf, size_t count,
  293. loff_t *ppos)
  294. {
  295. struct regmap *map = file->private_data;
  296. struct regmap_debugfs_off_cache *c;
  297. loff_t p = 0;
  298. size_t buf_pos = 0;
  299. char *buf;
  300. char *entry;
  301. int ret;
  302. unsigned entry_len;
  303. if (*ppos < 0 || !count)
  304. return -EINVAL;
  305. if (count > (PAGE_SIZE << (MAX_ORDER - 1)))
  306. count = PAGE_SIZE << (MAX_ORDER - 1);
  307. buf = kmalloc(count, GFP_KERNEL);
  308. if (!buf)
  309. return -ENOMEM;
  310. entry = kmalloc(PAGE_SIZE, GFP_KERNEL);
  311. if (!entry) {
  312. kfree(buf);
  313. return -ENOMEM;
  314. }
  315. /* While we are at it, build the register dump cache
  316. * now so the read() operation on the `registers' file
  317. * can benefit from using the cache. We do not care
  318. * about the file position information that is contained
  319. * in the cache, just about the actual register blocks */
  320. regmap_calc_tot_len(map, buf, count);
  321. regmap_debugfs_get_dump_start(map, 0, *ppos, &p);
  322. /* Reset file pointer as the fixed-format of the `registers'
  323. * file is not compatible with the `range' file */
  324. p = 0;
  325. mutex_lock(&map->cache_lock);
  326. list_for_each_entry(c, &map->debugfs_off_cache, list) {
  327. entry_len = snprintf(entry, PAGE_SIZE, "%x-%x\n",
  328. c->base_reg, c->max_reg);
  329. if (p >= *ppos) {
  330. if (buf_pos + entry_len > count)
  331. break;
  332. memcpy(buf + buf_pos, entry, entry_len);
  333. buf_pos += entry_len;
  334. }
  335. p += entry_len;
  336. }
  337. mutex_unlock(&map->cache_lock);
  338. kfree(entry);
  339. ret = buf_pos;
  340. if (copy_to_user(user_buf, buf, buf_pos)) {
  341. ret = -EFAULT;
  342. goto out_buf;
  343. }
  344. *ppos += buf_pos;
  345. out_buf:
  346. kfree(buf);
  347. return ret;
  348. }
  349. static const struct file_operations regmap_reg_ranges_fops = {
  350. .open = simple_open,
  351. .read = regmap_reg_ranges_read_file,
  352. .llseek = default_llseek,
  353. };
  354. static int regmap_access_show(struct seq_file *s, void *ignored)
  355. {
  356. struct regmap *map = s->private;
  357. int i, reg_len;
  358. reg_len = regmap_calc_reg_len(map->max_register);
  359. for (i = 0; i <= map->max_register; i += map->reg_stride) {
  360. /* Ignore registers which are neither readable nor writable */
  361. if (!regmap_readable(map, i) && !regmap_writeable(map, i))
  362. continue;
  363. /* Format the register */
  364. seq_printf(s, "%.*x: %c %c %c %c\n", reg_len, i,
  365. regmap_readable(map, i) ? 'y' : 'n',
  366. regmap_writeable(map, i) ? 'y' : 'n',
  367. regmap_volatile(map, i) ? 'y' : 'n',
  368. regmap_precious(map, i) ? 'y' : 'n');
  369. }
  370. return 0;
  371. }
  372. static int access_open(struct inode *inode, struct file *file)
  373. {
  374. return single_open(file, regmap_access_show, inode->i_private);
  375. }
  376. static const struct file_operations regmap_access_fops = {
  377. .open = access_open,
  378. .read = seq_read,
  379. .llseek = seq_lseek,
  380. .release = single_release,
  381. };
  382. static ssize_t regmap_cache_only_write_file(struct file *file,
  383. const char __user *user_buf,
  384. size_t count, loff_t *ppos)
  385. {
  386. struct regmap *map = container_of(file->private_data,
  387. struct regmap, cache_only);
  388. bool new_val, require_sync = false;
  389. int err;
  390. err = kstrtobool_from_user(user_buf, count, &new_val);
  391. /* Ignore malforned data like debugfs_write_file_bool() */
  392. if (err)
  393. return count;
  394. err = debugfs_file_get(file->f_path.dentry);
  395. if (err)
  396. return err;
  397. map->lock(map->lock_arg);
  398. if (new_val && !map->cache_only) {
  399. dev_warn(map->dev, "debugfs cache_only=Y forced\n");
  400. add_taint(TAINT_USER, LOCKDEP_STILL_OK);
  401. } else if (!new_val && map->cache_only) {
  402. dev_warn(map->dev, "debugfs cache_only=N forced: syncing cache\n");
  403. require_sync = true;
  404. }
  405. map->cache_only = new_val;
  406. map->unlock(map->lock_arg);
  407. debugfs_file_put(file->f_path.dentry);
  408. if (require_sync) {
  409. err = regcache_sync(map);
  410. if (err)
  411. dev_err(map->dev, "Failed to sync cache %d\n", err);
  412. }
  413. return count;
  414. }
  415. static const struct file_operations regmap_cache_only_fops = {
  416. .open = simple_open,
  417. .read = debugfs_read_file_bool,
  418. .write = regmap_cache_only_write_file,
  419. };
  420. static ssize_t regmap_cache_bypass_write_file(struct file *file,
  421. const char __user *user_buf,
  422. size_t count, loff_t *ppos)
  423. {
  424. struct regmap *map = container_of(file->private_data,
  425. struct regmap, cache_bypass);
  426. bool new_val;
  427. int err;
  428. err = kstrtobool_from_user(user_buf, count, &new_val);
  429. /* Ignore malforned data like debugfs_write_file_bool() */
  430. if (err)
  431. return count;
  432. err = debugfs_file_get(file->f_path.dentry);
  433. if (err)
  434. return err;
  435. map->lock(map->lock_arg);
  436. if (new_val && !map->cache_bypass) {
  437. dev_warn(map->dev, "debugfs cache_bypass=Y forced\n");
  438. add_taint(TAINT_USER, LOCKDEP_STILL_OK);
  439. } else if (!new_val && map->cache_bypass) {
  440. dev_warn(map->dev, "debugfs cache_bypass=N forced\n");
  441. }
  442. map->cache_bypass = new_val;
  443. map->unlock(map->lock_arg);
  444. debugfs_file_put(file->f_path.dentry);
  445. return count;
  446. }
  447. static const struct file_operations regmap_cache_bypass_fops = {
  448. .open = simple_open,
  449. .read = debugfs_read_file_bool,
  450. .write = regmap_cache_bypass_write_file,
  451. };
  452. void regmap_debugfs_init(struct regmap *map, const char *name)
  453. {
  454. struct rb_node *next;
  455. struct regmap_range_node *range_node;
  456. const char *devname = "dummy";
  457. /*
  458. * Userspace can initiate reads from the hardware over debugfs.
  459. * Normally internal regmap structures and buffers are protected with
  460. * a mutex or a spinlock, but if the regmap owner decided to disable
  461. * all locking mechanisms, this is no longer the case. For safety:
  462. * don't create the debugfs entries if locking is disabled.
  463. */
  464. if (map->debugfs_disable) {
  465. dev_dbg(map->dev, "regmap locking disabled - not creating debugfs entries\n");
  466. return;
  467. }
  468. /* If we don't have the debugfs root yet, postpone init */
  469. if (!regmap_debugfs_root) {
  470. struct regmap_debugfs_node *node;
  471. node = kzalloc(sizeof(*node), GFP_KERNEL);
  472. if (!node)
  473. return;
  474. node->map = map;
  475. node->name = name;
  476. mutex_lock(&regmap_debugfs_early_lock);
  477. list_add(&node->link, &regmap_debugfs_early_list);
  478. mutex_unlock(&regmap_debugfs_early_lock);
  479. return;
  480. }
  481. INIT_LIST_HEAD(&map->debugfs_off_cache);
  482. mutex_init(&map->cache_lock);
  483. if (map->dev)
  484. devname = dev_name(map->dev);
  485. if (name) {
  486. if (!map->debugfs_name) {
  487. map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
  488. devname, name);
  489. if (!map->debugfs_name)
  490. return;
  491. }
  492. name = map->debugfs_name;
  493. } else {
  494. name = devname;
  495. }
  496. if (!strcmp(name, "dummy")) {
  497. kfree(map->debugfs_name);
  498. map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
  499. dummy_index);
  500. if (!map->debugfs_name)
  501. return;
  502. name = map->debugfs_name;
  503. dummy_index++;
  504. }
  505. map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);
  506. if (!map->debugfs) {
  507. dev_warn(map->dev,
  508. "Failed to create %s debugfs directory\n", name);
  509. kfree(map->debugfs_name);
  510. map->debugfs_name = NULL;
  511. return;
  512. }
  513. debugfs_create_file("name", 0400, map->debugfs,
  514. map, &regmap_name_fops);
  515. debugfs_create_file("range", 0400, map->debugfs,
  516. map, &regmap_reg_ranges_fops);
  517. if (map->max_register || regmap_readable(map, 0)) {
  518. umode_t registers_mode;
  519. #if defined(REGMAP_ALLOW_WRITE_DEBUGFS)
  520. registers_mode = 0600;
  521. #else
  522. registers_mode = 0400;
  523. #endif
  524. debugfs_create_file("registers", registers_mode, map->debugfs,
  525. map, &regmap_map_fops);
  526. debugfs_create_file("access", 0400, map->debugfs,
  527. map, &regmap_access_fops);
  528. }
  529. if (map->cache_type) {
  530. debugfs_create_file("cache_only", 0600, map->debugfs,
  531. &map->cache_only, &regmap_cache_only_fops);
  532. debugfs_create_bool("cache_dirty", 0400, map->debugfs,
  533. &map->cache_dirty);
  534. debugfs_create_file("cache_bypass", 0600, map->debugfs,
  535. &map->cache_bypass,
  536. &regmap_cache_bypass_fops);
  537. }
  538. next = rb_first(&map->range_tree);
  539. while (next) {
  540. range_node = rb_entry(next, struct regmap_range_node, node);
  541. if (range_node->name)
  542. debugfs_create_file(range_node->name, 0400,
  543. map->debugfs, range_node,
  544. &regmap_range_fops);
  545. next = rb_next(&range_node->node);
  546. }
  547. if (map->cache_ops && map->cache_ops->debugfs_init)
  548. map->cache_ops->debugfs_init(map);
  549. }
  550. void regmap_debugfs_exit(struct regmap *map)
  551. {
  552. if (map->debugfs) {
  553. debugfs_remove_recursive(map->debugfs);
  554. mutex_lock(&map->cache_lock);
  555. regmap_debugfs_free_dump_cache(map);
  556. mutex_unlock(&map->cache_lock);
  557. kfree(map->debugfs_name);
  558. map->debugfs_name = NULL;
  559. } else {
  560. struct regmap_debugfs_node *node, *tmp;
  561. mutex_lock(&regmap_debugfs_early_lock);
  562. list_for_each_entry_safe(node, tmp, &regmap_debugfs_early_list,
  563. link) {
  564. if (node->map == map) {
  565. list_del(&node->link);
  566. kfree(node);
  567. }
  568. }
  569. mutex_unlock(&regmap_debugfs_early_lock);
  570. }
  571. }
  572. void regmap_debugfs_initcall(void)
  573. {
  574. struct regmap_debugfs_node *node, *tmp;
  575. regmap_debugfs_root = debugfs_create_dir("regmap", NULL);
  576. if (!regmap_debugfs_root) {
  577. pr_warn("regmap: Failed to create debugfs root\n");
  578. return;
  579. }
  580. mutex_lock(&regmap_debugfs_early_lock);
  581. list_for_each_entry_safe(node, tmp, &regmap_debugfs_early_list, link) {
  582. regmap_debugfs_init(node->map, node->name);
  583. list_del(&node->link);
  584. kfree(node);
  585. }
  586. mutex_unlock(&regmap_debugfs_early_lock);
  587. }