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.

PCI/pwrctrl: tc9563: Clean up whitespace

Most of pci-pwrctrl-tc9563.c fits in 80 columns. Wrap lines that are
gratuitously longer. Whitespace changes only.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260115-pci-pwrctrl-rework-v5-4-9d26da3ce903@oss.qualcomm.com

+42 -23
+42 -23
drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
··· 59 59 #define TC9563_POWER_CONTROL_OVREN 0x82b2c8 60 60 61 61 #define TC9563_GPIO_MASK 0xfffffff3 62 - #define TC9563_GPIO_DEASSERT_BITS 0xc /* Bits to clear for GPIO deassert */ 62 + #define TC9563_GPIO_DEASSERT_BITS 0xc /* Clear to deassert GPIO */ 63 63 64 64 #define TC9563_TX_MARGIN_MIN_UA 400000 65 65 ··· 69 69 */ 70 70 #define TC9563_OSC_STAB_DELAY_US (10 * USEC_PER_MSEC) 71 71 72 - #define TC9563_L0S_L1_DELAY_UNIT_NS 256 /* Each unit represents 256 nanoseconds */ 72 + #define TC9563_L0S_L1_DELAY_UNIT_NS 256 /* Each unit represents 256 ns */ 73 73 74 74 struct tc9563_pwrctrl_reg_setting { 75 75 unsigned int offset; ··· 217 217 } 218 218 219 219 static int tc9563_pwrctrl_i2c_bulk_write(struct i2c_client *client, 220 - const struct tc9563_pwrctrl_reg_setting *seq, int len) 220 + const struct tc9563_pwrctrl_reg_setting *seq, 221 + int len) 221 222 { 222 223 int ret, i; 223 224 ··· 253 252 if (ret) 254 253 return ret; 255 254 256 - return tc9563_pwrctrl_i2c_bulk_write(ctx->client, 257 - common_pwroff_seq, ARRAY_SIZE(common_pwroff_seq)); 255 + return tc9563_pwrctrl_i2c_bulk_write(ctx->client, common_pwroff_seq, 256 + ARRAY_SIZE(common_pwroff_seq)); 258 257 } 259 258 260 259 static int tc9563_pwrctrl_set_l0s_l1_entry_delay(struct tc9563_pwrctrl_ctx *ctx, 261 - enum tc9563_pwrctrl_ports port, bool is_l1, u32 ns) 260 + enum tc9563_pwrctrl_ports port, 261 + bool is_l1, u32 ns) 262 262 { 263 263 u32 rd_val, units; 264 264 int ret; ··· 271 269 units = ns / TC9563_L0S_L1_DELAY_UNIT_NS; 272 270 273 271 if (port == TC9563_ETHERNET) { 274 - ret = tc9563_pwrctrl_i2c_read(ctx->client, TC9563_EMBEDDED_ETH_DELAY, &rd_val); 272 + ret = tc9563_pwrctrl_i2c_read(ctx->client, 273 + TC9563_EMBEDDED_ETH_DELAY, 274 + &rd_val); 275 275 if (ret) 276 276 return ret; 277 277 278 278 if (is_l1) 279 - rd_val = u32_replace_bits(rd_val, units, TC9563_ETH_L1_DELAY_MASK); 279 + rd_val = u32_replace_bits(rd_val, units, 280 + TC9563_ETH_L1_DELAY_MASK); 280 281 else 281 - rd_val = u32_replace_bits(rd_val, units, TC9563_ETH_L0S_DELAY_MASK); 282 + rd_val = u32_replace_bits(rd_val, units, 283 + TC9563_ETH_L0S_DELAY_MASK); 282 284 283 - return tc9563_pwrctrl_i2c_write(ctx->client, TC9563_EMBEDDED_ETH_DELAY, rd_val); 285 + return tc9563_pwrctrl_i2c_write(ctx->client, 286 + TC9563_EMBEDDED_ETH_DELAY, 287 + rd_val); 284 288 } 285 289 286 - ret = tc9563_pwrctrl_i2c_write(ctx->client, TC9563_PORT_SELECT, BIT(port)); 290 + ret = tc9563_pwrctrl_i2c_write(ctx->client, TC9563_PORT_SELECT, 291 + BIT(port)); 287 292 if (ret) 288 293 return ret; 289 294 290 295 return tc9563_pwrctrl_i2c_write(ctx->client, 291 - is_l1 ? TC9563_PORT_L1_DELAY : TC9563_PORT_L0S_DELAY, units); 296 + is_l1 ? TC9563_PORT_L1_DELAY : TC9563_PORT_L0S_DELAY, 297 + units); 292 298 } 293 299 294 300 static int tc9563_pwrctrl_set_tx_amplitude(struct tc9563_pwrctrl_ctx *ctx, ··· 331 321 {TC9563_TX_MARGIN, amp}, 332 322 }; 333 323 334 - return tc9563_pwrctrl_i2c_bulk_write(ctx->client, tx_amp_seq, ARRAY_SIZE(tx_amp_seq)); 324 + return tc9563_pwrctrl_i2c_bulk_write(ctx->client, tx_amp_seq, 325 + ARRAY_SIZE(tx_amp_seq)); 335 326 } 336 327 337 328 static int tc9563_pwrctrl_disable_dfe(struct tc9563_pwrctrl_ctx *ctx, ··· 375 364 {TC9563_PHY_RATE_CHANGE_OVERRIDE, 0x0}, 376 365 }; 377 366 378 - return tc9563_pwrctrl_i2c_bulk_write(ctx->client, 379 - disable_dfe_seq, ARRAY_SIZE(disable_dfe_seq)); 367 + return tc9563_pwrctrl_i2c_bulk_write(ctx->client, disable_dfe_seq, 368 + ARRAY_SIZE(disable_dfe_seq)); 380 369 } 381 370 382 371 static int tc9563_pwrctrl_set_nfts(struct tc9563_pwrctrl_ctx *ctx, ··· 392 381 if (!nfts[0]) 393 382 return 0; 394 383 395 - ret = tc9563_pwrctrl_i2c_write(ctx->client, TC9563_PORT_SELECT, BIT(port)); 384 + ret = tc9563_pwrctrl_i2c_write(ctx->client, TC9563_PORT_SELECT, 385 + BIT(port)); 396 386 if (ret) 397 387 return ret; 398 388 399 - return tc9563_pwrctrl_i2c_bulk_write(ctx->client, nfts_seq, ARRAY_SIZE(nfts_seq)); 389 + return tc9563_pwrctrl_i2c_bulk_write(ctx->client, nfts_seq, 390 + ARRAY_SIZE(nfts_seq)); 400 391 } 401 392 402 - static int tc9563_pwrctrl_assert_deassert_reset(struct tc9563_pwrctrl_ctx *ctx, bool deassert) 393 + static int tc9563_pwrctrl_assert_deassert_reset(struct tc9563_pwrctrl_ctx *ctx, 394 + bool deassert) 403 395 { 404 396 int ret, val; 405 397 406 - ret = tc9563_pwrctrl_i2c_write(ctx->client, TC9563_GPIO_CONFIG, TC9563_GPIO_MASK); 398 + ret = tc9563_pwrctrl_i2c_write(ctx->client, TC9563_GPIO_CONFIG, 399 + TC9563_GPIO_MASK); 407 400 if (ret) 408 401 return ret; 409 402 ··· 416 401 return tc9563_pwrctrl_i2c_write(ctx->client, TC9563_RESET_GPIO, val); 417 402 } 418 403 419 - static int tc9563_pwrctrl_parse_device_dt(struct tc9563_pwrctrl_ctx *ctx, struct device_node *node, 404 + static int tc9563_pwrctrl_parse_device_dt(struct tc9563_pwrctrl_ctx *ctx, 405 + struct device_node *node, 420 406 enum tc9563_pwrctrl_ports port) 421 407 { 422 408 struct tc9563_pwrctrl_cfg *cfg = &ctx->cfg[port]; ··· 556 540 for (int i = 0; i < ARRAY_SIZE(tc9563_supply_names); i++) 557 541 ctx->supplies[i].supply = tc9563_supply_names[i]; 558 542 559 - ret = devm_regulator_bulk_get(dev, TC9563_PWRCTL_MAX_SUPPLY, ctx->supplies); 543 + ret = devm_regulator_bulk_get(dev, TC9563_PWRCTL_MAX_SUPPLY, 544 + ctx->supplies); 560 545 if (ret) { 561 546 dev_err_probe(dev, ret, "failed to get supply regulator\n"); 562 547 goto remove_i2c; ··· 580 563 581 564 /* 582 565 * Downstream ports are always children of the upstream port. 583 - * The first node represents DSP1, the second node represents DSP2, and so on. 566 + * The first node represents DSP1, the second node represents DSP2, 567 + * and so on. 584 568 */ 585 569 for_each_child_of_node_scoped(pdev->dev.of_node, child) { 586 570 port++; ··· 592 574 if (port == TC9563_DSP3) { 593 575 for_each_child_of_node_scoped(child, child1) { 594 576 port++; 595 - ret = tc9563_pwrctrl_parse_device_dt(ctx, child1, port); 577 + ret = tc9563_pwrctrl_parse_device_dt(ctx, 578 + child1, port); 596 579 if (ret) 597 580 break; 598 581 }